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

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


The path should only contain directories where the OS will look for executables. Strip the trailing "\jar.exe" to set your path as:

(old path variables here);C:\Program Files (x86)\Java\jdk1.7\bin

Thanks To : @stevevls


Try using this command:

java -version

If it doesn't work that means you failed to properly add path to jdk.If it does work, try using:

java -jar


The jar command in command line is used in order to create a JAR file. For example:

 jar cf jar-file input-file(s)

See more at: Oracle docs

If you want to run the existed JAR file you should use the java -jar command mentioned by @Aleksandr.

But in your case it looks like you don't have an access to the added directory in your path with JKD binaries so at the beginning try to execute mentioned java --version to check whether you have java in you classpath at all.

Please remember that on Windows you have to restart the console when you change the windows default path. You do not see the changes on the current console.

The x64 version of Java is installed on Program Files. The x86 version is installed on Program Files x86 by default.