[java] 'jar' is not recognized as an internal or external command

Started by
2 comments, last by EGD Eric 17 years, 5 months ago
...is the message I get when I try to use jar commands. Why is this? I don't understand. I have the JRE and JDK installed into this directory: C:\Program Files\Java For my environment variables, I have: CLASSPATH: .;C:\Program Files\Java\jdk1.5.0_04\bin;C:\Program Files\QuickTime\QTSystem\QTJava.zip Path: (nested among other many other paths) C:\Program Files\Java\j2re1.4.2_12\bin I'm at a loss for what could be going wrong here. Is it the spaces in Program Files? could that be doing it?
Advertisement
The JRE is on your PATH, not the JDK. The jar tool is not part of the JRE. Put the jdk1.5_04/bin path on your PATH instead. Also, you don't need the JDK bin directory on your CLASSPATH. There aren't any classes in the bin directory for any Java applications to use. You can safely remove it.
Quote:Original post by EGD Eric
C:\Program Files\Java\jdk1.5.0_04\bin
Have you ever thought about typping the jar command with its path?
I think you can create jar.cmd in your directory if you are in desperate need of use of the command line.
Thanks Aldacron, that did it. :)

This topic is closed to new replies.

Advertisement