Friday, March 29, 2024

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

If you wish to check the java version via:

java -version

You get the following error message:

'java' is not recognized as an internal or external command, operable program or batch file.

To solve the issue check if you have the latest Java engine installed. If it is the case then check if your path variable contains the path to the bin folder.

 

It is always a good practice to customize the java installation and remove the version numbers from the installation folders (Example: C:\Program Files (x86)\Java\jre). This will help to prevent issues with pathnames, which detect java during the first installation, but never try to detect java after you might have updated it to a later version. So if you keep the foldername unchanged you can prevent such issues.

 If you wish to add java to the current variable without changing the path variable permanently (or if you wish to prevent a server reboot) you can perform the following:

SET PATH=%PATH%;C:\Program Files (x86)\Java\jre\bin

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

35FollowersFollow
- Advertisement -

Latest Articles