Running Java gives “Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'”

前端 未结 21 2409
别跟我提以往
别跟我提以往 2020-11-27 17:38

After years of working OK, I\'m suddenly getting this message when trying to start the JVM:

Error: could not open `C:\\Program Files\\Java\\jre6\\lib\\amd64\         


        
21条回答
  •  情歌与酒
    2020-11-27 18:40

    I had a slight different solution to this problem. my PATH and JAVA_HOME were pointing to JDK12 in

    C:\Program Files\Java
    

    but execution of the command:

    Java -version
    

    gave the error:

    Error: could not open `C:\ProgramFiles\Java\jre1.8.0_212\lib\amd64\jvm.cfg'
    

    I had to delete a folder of executables (Java.exe, javaw.exe etc.) in a different directory than System32, as other answers here and blog posts have suggested. Instead I found the problem lied with executables found in:

    C:\Program Files\Common Files\Oracle 
    

    as there was nothing Java related in

    C:\Windows\System32
    

    If you're having this issue and nothing is in System32, check this "common files" directory mentioned above for an oracle directory and delete it.

    After, your PATH references should work fine!

提交回复
热议问题