-1

Command Prompt gives me this output('jar' is not recognized as an internal or external command, operable program or batch file.) when I enter the command 'jar'. I have installed the Java Development Kit 16 and I have set my JAVA_HOME Variable. java -version works! Why does it not work?

Willie-3
  • 21
  • 1

1 Answers1

1

You have to update your PATH environment variable, add:

  • Windows : ...;%JAVA_HOME%\bin
  • Linux : ...:${JAVA_HOME}/bin

With Linux, you can also have a look to update-java-alternatives or update-alternatives.
This will create symbolic links to your JDK binaries.
See: How to use the command update-alternatives --config java

Stéphane Millien
  • 3,238
  • 22
  • 36