Skip to main content
deleted 124 characters in body
Source Link

I Faced the same issue while upgrading to OpenJDK17 from JDK8 and got this error while trying Javaexecuting -versionJava -version in cmd.

Fix: As pointed out by others in this threadgoto path C:\Program Files\Java\jdk-17\bin copy files java.exe and javaw.exe, goto path C:\ProgramData\Oracle\Java\javapath and delete the existing shortcuts.( I had java 8 before this and shortcuts were placed to java.exe, javaw.exe & javaws.exe. In case of Java 17 javaws.exe is no longer available in the java\bin so this is not required) and shortcuts didn't work in my case so I placed thepaste these two files itself directly in the path(C:\ProgramData\Oracle\Java\javapath) from binthere.

I Faced the same issue while upgrading to OpenJDK17 and got this error while trying Java -version

Fix: As pointed out by others in this thread goto path C:\ProgramData\Oracle\Java\javapath and delete the existing shortcuts. I had java 8 before this and shortcuts were placed to java.exe, javaw.exe & javaws.exe. In case of Java 17 javaws.exe is no longer available in the java\bin so this is not required and shortcuts didn't work in my case so I placed the files itself directly in the path(C:\ProgramData\Oracle\Java\javapath) from bin.

Faced the same issue while upgrading to OpenJDK17 from JDK8 and got this error while executing Java -version in cmd.

Fix: goto path C:\Program Files\Java\jdk-17\bin copy files java.exe and javaw.exe, goto path C:\ProgramData\Oracle\Java\javapath and delete the existing shortcuts( I had java 8 before this and shortcuts were placed to java.exe, javaw.exe & javaws.exe.) and paste these two files there.

Source Link

I Faced the same issue while upgrading to OpenJDK17 and got this error while trying Java -version

Fix: As pointed out by others in this thread goto path C:\ProgramData\Oracle\Java\javapath and delete the existing shortcuts. I had java 8 before this and shortcuts were placed to java.exe, javaw.exe & javaws.exe. In case of Java 17 javaws.exe is no longer available in the java\bin so this is not required and shortcuts didn't work in my case so I placed the files itself directly in the path(C:\ProgramData\Oracle\Java\javapath) from bin.