I'm making a JApplet and need to make a JAR file to connect to a .htm file with the applet tag. The simple solution I could think of was to use the tool in drjava that says "Create Jar File From Project..." but alas, it's not highlighted for some reason, so I can't do that. What I'm really looking for is either (a) an explanation as to why drjava can't turn my classes into a jar file, (b) an alternative to allow me to create this jar file, or ideally (c) both. Thanks for your help ahead of time.
Asked
Active
Viewed 2,212 times
1 Answers
0
I don't use Drjava, but here is how you can create a JAR file from the command line without any IDE specific complications.
Simply go to the folder/directory where your project is located. Let's say your class files are located in the bin
folder. You can then use
jar cvf myapplet.jar -C bin .
The JAR is then ready to be deployed.

Reimeus
- 158,255
- 15
- 216
- 276
-
Great! It seemed to work, but I don't know where the jar file is now. Where would I find it? – crarho Feb 28 '13 at 02:26
-
It should be in your project folder from where you ran the command – Reimeus Feb 28 '13 at 02:39
-
It appears that my Java has somehow been really messed up considering the fact that I can't open **any** jar files on my computer. The mac's default application, Jar Launcher, doesn't even work anymore and always displays an error. I suspect this entire issue of making a jar file is becoming very convoluted as a direct result of something that happened in which my Java either got corrupted or obsolete although it's the latest version. Thanks for your help, though, I appreciate it – crarho Feb 28 '13 at 02:50