redleo
redleo

Reputation: 81

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.

Upvotes: 8

Views: 12856

Answers (2)

Harsh
Harsh

Reputation: 2989

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

Upvotes: -1

reachSDK
reachSDK

Reputation: 91

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.

Upvotes: 9

Related Questions