简体   繁体   中英

Java se “occurred during initialization of VM”

I installed jdk se 32bit on windows 7 x64. At "http://www.oracle.com/technetwork/java/javase/downloads/index.html" for windows.

And I got this error message.

C:\Users\Administrator>javac -version Error occurred during initialization of VM java.lang.ClassNotFoundException: error in opening JAR file d:\Program Files (x8 6)\prg_java\jdk1.6.0_26\jre\lib\rt.jar at java.security.AccessControlContext.(AccessControlContext.java:77) at java.security.AccessController.getStackAccessControlContext(Native Me thod) at java.security.AccessController.getContext(AccessController.java:484) at java.lang.Thread.init(Thread.java:358) at java.lang.Thread.(Thread.java:476)

java.lang.ClassNotFoundException: error in opening JAR file jdk1.6.0_26\jre\lib\rt.jar

How can I solve this problem?

Thanks in advance.

This problem occurs due to corrupt files in the JAVA SE you are using.

  1. Uninstall the jdk you are using
  2. Download the jdk setup file (which ever release you need)
  3. Install the jdk. Change the env vars correctly.

Now you won't get this error.

Check and provide path for correct JRE in your eclipse.

In Eclipse go to Window-->Preferences Then look for Installed JRE Apply current path till JRE from your directory.

Make sure your JRE has necessory jar files C:\Program Files\Java\jre(your version)\lib\rt.jar etc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM