Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java se "occurred during initialization of VM"

Tags:

java

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.

like image 655
redleo Avatar asked Jul 16 '11 14:07

redleo


People also ask

How do I fix Error occurred during initialization of virtual machine?

Install the newer version JDK kit 64 bit (includes JRE) Set the environment path (To avoid conflict error if you have two different 64bit JRE) Check in command prompt by typing javac command. Restart / Done.

Could not reserve enough space for 2097152kb object heap Error occurred during initialization of VM?

You might get an specific error Could not reserve enough space for 2097152kb object heap in case you are using any tool. It simply means that JVM is not able to acquire 2 GB heap space which is required by the tool by default.


1 Answers

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.

like image 171
reachSDK Avatar answered Oct 16 '22 19:10

reachSDK