'jar' is not recognized as an internal or external command

Hi

after insatlling j2sdk1.4.2, when i try to give the command jar -? or javac -? from outside the bin directory of javahome, Error ocurrs as "'jar' is not recognized as an internal or external command, operable program or batch file."

The class path set is CLASSPATH=D:\j2sdk1.4.2\bin;D:\j2sdk1.4.2\lib;D:\j2sdk1.4.2\jre

Strange behaviour is that while giving java -? from outside the bin directory, it executes properly and displays the help of java command.

Looking forwrd for the reply

thanx in advance

[545 byte] By [kiran.maheshwari] at [2007-9-30 19:37:59]
# 1

you get 'java' because the bin directory of the JRE is on the PATH environment variable.

The JRE does not have the 'jar' command (only the JDK does).

You need to add the JDK 'bin' directory to your PATH.

Classpath has nothing to do, it only relates to your Java classes.

hth,

-Alexis

am74686 at 2007-7-7 0:22:57 > top of Java-index,Administration Tools,Sun Connection...
# 2
Thanx for replying.After setting the PATH variable to bin directory, it worked fine.
kiran.maheshwari at 2007-7-7 0:22:57 > top of Java-index,Administration Tools,Sun Connection...
# 3
hi,I am facing following problem'jar' is not recognized as an internal or external command,operable program or batch file.Will somebody plz help me.Ami
Akg007 at 2007-7-7 0:22:57 > top of Java-index,Administration Tools,Sun Connection...
# 4
> 'jar' is not recognized as an internal or external command,Make yourself familiar with the way your OS finds a command or executable and the role of the PATH environment variable.
BIJ001 at 2007-7-7 0:22:57 > top of Java-index,Administration Tools,Sun Connection...