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

后端 未结 11 1782
耶瑟儿~
耶瑟儿~ 2020-12-08 14:41

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

相关标签:
11条回答
  • 2020-12-08 15:20

    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.

    0 讨论(0)
  • 2020-12-08 15:20

    sometime you missed some file like I missed my one file rt.java so better to check yours .........

    C:\Program Files\Java\jdk1.8.0_112\jre\lib
    
    0 讨论(0)
  • 2020-12-08 15:20

    I've observed this with STS and Eclipse and running java from CMD too on Windows 7/8/10 and following was my simple solution:

    Actually, when I installed JDK 8 and STS/Eclipse it created one directory i.e. C:\ProgramData\Oracle\Java\javapath with the following files:

    • C:\ProgramData\Oracle\Java\javapath\java.exe
    • C:\ProgramData\Oracle\Java\javapath\javaw.exe
    • C:\ProgramData\Oracle\Java\javapath\javaws.exe

    Along with that, it appended Path Environment variable of System with this location C:\ProgramData\Oracle\Java\javapath

    I've just removed above entry from Path Environment variable of System and added the location of the actual JDK instead i.e. C:\Program Files\Java\jdk1.8.0_131\bin

    Now that is not necessary to add that -vm option in eclipse.ini or SpringToolSuite4.ini either.

    0 讨论(0)
  • 2020-12-08 15:25

    I had the same error in my case was when I needed to update jdk 7 to jdk 8, and my bad was just I installed jdk8 and I never installed jre8, only that, the error was solved immediately when I installed jre8.

    0 讨论(0)
  • 2020-12-08 15:25

    I faced the same problem,Eclipse splash screen for a second and it disappears.Then i noticed due to auto update of java there are two java version installed in my system. when i uninstalled one eclipse started working.

    Thanks you..

    0 讨论(0)
提交回复
热议问题