Originally posted by physicsnerd
Okay, here's what you do.
1st, you've got to find the main file. Sometimes it's labeled main, or the name of the program. It will be a .java files. Go in to terminal, and go to the file.
Then once you've found the file you type:
javac <filename.java>
This will create a .class file in the same directory as the .java file you compiled.
Then type java filename (do not put .class or .java after it).
This should complie and run the program. Let me know if you have any problems.
Physicsnerd
INTRODUCTION
The JTella API project is an effort to create a simple, easy to use Java
programming interface for the GNUTella network. The goal is to make it easy
to produce Java applications and tools for accessing the GNUTella network.
Originally posted by physicsnerd
from the readme:
This is not a program like you think it is. This is an API. What these files let you do is write programs that can access the different fuctions of GNUTella. However, it is not a GNUTella client. Atleast it doesn't look to be. Can anyone verify my conclusion?
Physicsnerd
Originally posted by szark
Agreed. This is not a self-contained program.
You would need to write a java program to use the source code you downloaded.
Originally posted by jethroted
What? I need to write a program to use the source code? So I can't use this stuff at all with out doing that?
Originally posted by zimv20
well, you could find a program someone else wrote to use the library, but in general, yes.
a jar is simply a collection of pre-compiled java files. it's akin to a unix .so library or (the dreaded) windows .dll.
like those, you put the jars in a known place and direct your java environment to that place (i think the environment variable is JARPATH, but i haven't done any java in 4 years).
i recommend buying a java book and doing some reading. (sorry, i have no recommendations on which book)
Originally posted by jethroted
OK, so the .jar file is pre compiled. So that should be ready to run then? Or do I have to do something with it to get it ready to run?
Originally posted by zimv20
as long as the program you're running (the one you don't have yet) knows where it is, you're good to go.
Originally posted by jethroted
Oh man, I give up. Why didn't they just have the binary there?
This is ridiculous, I thought compiling was as simple as taking your source code, then running it through a compiler, and then you get your binary file. That makes sense to me.
Originally posted by zimv20
the jar _is_ the "binary."
errrr.... it is that simple. except when you're sharing code across executables, then you need to get into libraries (jarfiles, in the case of java).
and the added complexity that java runs in a virtual machine. but that complexity shouldn't affect you (since you're not writing something on the magnitude of a compiler).
buy a book. start small.
Originally posted by jethroted
they should have released an executable file as well so people who just want to run the app could do so.
Originally posted by jethroted
I guess that is what i'll have to do, although i didn't really want to get into programing, I just wanted to run an app. I realize they released the source code so developers could work on it, but they should have released an executable file as well so people who just want to run the app could do so.
Originally posted by jethroted
I guess that is what i'll have to do, although i didn't really want to get into programing, I just wanted to run an app. I realize they released the source code so developers could work on it, but they should have released an executable file as well so people who just want to run the app could do so.