Compile Java - .class, .java, .jar ?
Hi all,
This should be an easy question for you guy, please help. Currently, I'm building a website, which allow my visitors to upload files by drag & drop. I found JUpload ( the GPL version at http://sourceforge.net/projects/jupload/ ) and I'm able to set it up under Windows. My goal is to use this Java applet on Linux. I don't know anything about JAVA and I don't know how to compile the JAVA source code. Inside the "src" folder, there are several .java files. I tried to use "javac" and some of the .java files were able to turn into .class files and some could not (for some reason) My question is.. for the binary applet that I downloaded, it is in .jar format. How do I make a .jar file from all those .class files?? What is .class and .jar anyway?:study: In general how do I compile a JAVA applet? What tools do I need? Do I really need to recompile the applet? Can the same applet work in both Windows and Linux OS? Please help this JAVA newbie :newbie: |
Quote:
jar cf myjar.jar *.class Quote:
Quote:
Quote:
|
jar is a java archive like tar
.class is a compiled java source .java file and the name i guess is a reflection of the object oriented nature of java "class" is an OO structure introduced in c++ you do not need to recompile the applet the same applet will work on all platforms or if it won't it needs rewriting not recompile. no need to put applets in jars really take a look at the examples in you jdk to make an executable .jar archive (see java docs or look at an exaple manifest file) jar cmf manifest.mf myJar.jar *.class |
All times are GMT -5. The time now is 05:20 PM. |