Error Occurred During Initialization Of VM

Above given error can occur if you have installed updated java on your server and a shadowed copy of java has been placed in the windows directory. Due to any reason the java which is originally installed got corrupted or removed from the system and installed another one, the shadowed copy of java will remain available in the windows directory. The above error sometimes go away by just setting up the path in the advanced properties of server but if its not being resolved by setting up the server path, please follow the under given instructions.

First check if the java installed on the system is working fine. You can check it by going to command prompt and entering the following command:

C:>java

Error is given as under:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Using the command prompt navigate to the bin under JAVA directory and enter the above command again.

E:Program FilesJavajdk1.6.0_07bin>

Result will be like under given:

E:Program FilesJavajdk1.6.0_07bin>java

Usage: java [-options] class [args…]
           (to execute a class)
   or  java [-options] -jar jarfile [args…]
           (to execute a jar file)

where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

You have done two things, one checked the system path for JAVA and its Ok and checked that JAVA is working fine. Still you are getting the same error, its annoying and unacceptable at all.

Solution

To solve this issue please go to windows directory and start a search using windows companion. Search for java.exe and delete all the files found under windows directory because the system path for java is setup under program files.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.