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

前端 未结 21 2287
别跟我提以往
别跟我提以往 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!

    0 讨论(0)
  • 2020-11-27 18:40

    Delete the jars under system32 for windows. Delete the jars under C:\Program Files\Common Files\Oracle

    Edit the environment variable set JAVA_HOME and SET PATH to bin

    0 讨论(0)
  • 2020-11-27 18:41
    Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'
    

    Looking @ it the issue of post install script is there and getting propagated since I am using update jdk8 1.8.0_191 since issue occurred with me after installing update of java and which was happened automatically.

    Error: could not open `C:\Program Files\Java\jre1.8.0_191\lib\amd64\jvm.cfg'
    

    This will be never ending in this case and need to do workaround like changing path's manually.

    0 讨论(0)
提交回复
热议问题