How to Fix Jar Not Recognized Error On Windows

The other day I was trying to view the contents of a jar file by entering this on the command line:

jar tf jarfilename.jar

I got the following error:

‘jar’ is not recognized as an internal or external command, operable program or batch file

To fix this error:

Make sure a JAVA_HOME environment variable is set to the location of your Java installation, such as C:Program Files(x86)Javajdk1.8.0_25

Then add the following to the PATH environment variable to include the Java installation’s bin directory: %JAVA_HOME%bin

#paidlinks

More Java