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

后端 未结 11 1790
耶瑟儿~
耶瑟儿~ 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

    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.

提交回复
热议问题