File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes creating a jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "creating a jar file" Watch "creating a jar file" New topic

creating a jar file

kenji mapes
Ranch Hand

Joined: Jun 16, 2005
Posts: 38
Maybe it's just me but the Java Tutorial documentation is not helpful. I know the commands but can't seem to create one.

Every time I go into a command line or a shell in Win, it says the command jar is unrecognized. I get the same when I go into the Gnome Terminal on my Linux box.

Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2398
You need to put the bin directory of JAVA_HOME in your PATH assuming JAVA_HOME is the directory of your JSDK.
kenji mapes
Ranch Hand

Joined: Jun 16, 2005
Posts: 38
Got it. Appended the system variables and user variables in advanced/environment variables with C:\j2sdk1.4.2_04\bin (which is where my J Archive Tool is, of course).

At the cmd prompt, jar then worked! Awesome. Thanks.

I agree. Here's the link:
subject: creating a jar file
It's not a secret anymore!