Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error occurred during initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)

I'm trying to install Java to use Eclipse (I followed all instructions to install Java and Eclipse) but my Eclipse is not starting due to some bad configuration I guess. I can't figure out why it's not working for me.

Eclipse Installation:

  1. Extracted Eclipse at C:\eclipse
  2. Created a shortcut to my desktop having target C:\eclipse\eclipse.exe

When I try to run Eclipse with this shortcut, I see following Eclipse splash screen for a second and it disappears. Eclipse does not start at all.

Eclipse Splash Screen

JAVA Installation:

  1. Installed JDK at C:\Program Files\Java\jdk1.7.0_10
  2. Installed JRE at C:\Program Files\Java\jre7

Environment Variables Configuration:

JAVA_HOME = C:\Program Files\Java\jdk1.7.0_10 PATH = C:\Program Files\Java\jdk1.7.0_10\bin; 

I tested my Java installation using the console and figured out this issue but I don't know how to fix it, and I guess this is causing Eclipse not to start.

Problem:

enter image description here

like image 797
Tahir Yasin Avatar asked Jan 01 '13 08:01

Tahir Yasin


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.


1 Answers

Go to Eclipse folder, locate eclipse.ini file, add following entry (before -vmargs if present):

-vm C:\Program Files\Java\jdk1.7.0_10\bin\javaw.exe 

Save file and execute eclipse.exe.

like image 199
Anish Avatar answered Oct 02 '22 18:10

Anish