Java se "occurred during virtual machine initialization"

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

And I got this error message.

C: \ Users \ Administrator> javac -version Error initializing virtual machine java.lang.ClassNotFoundException: error opening JAR file d: \ Program Files (x8) 6) \ prg_java \ jdk1.6.0_26 \ JRE \ Lib \ rt. jar in java.security.AccessControlContext. (AccessControlContext.java: 77) in java.security.AccessController.getStackAccessControlContext (Native Me ThOD) in java.security.AccessController.getContext (AccessController.java:484) in java.lang.Thread.init (Thread.javahaps58) in java.lang.Thread. (Thread.java-00-0076)

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

How can I solve this problem?

Thanks in advance.

+7
source share
2 answers

This issue occurs due to corrupted files in JAVA SE that you are using.

  • Remove the jdk you are using
  • Download the jdk installation file (which you ever need)
  • Install jdk. Change env vars correctly.

Now you will not get this error.

+7
source

Check and specify the path for the correct JRE in your eclipse.

In Eclipse, go to Window-->Preferences then find the Installed JRE Apply the current path to the JRE from your directory.

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

0
source

All Articles