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

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

    I just spent about 1 hour to figure out possible solution for the same error.

    So what I did under MS WIndows 7 is following

    1. Uninstall all Java packages of all versions.

    2. Download last packages Java SE or JRE for your 32 or 64 Windows and install it.

    3. First install JRE and second is Java SE.

    1. Open text editor and paste this code.

      public class Hello {

        public static void main(String[] args) {
      
           System.out.println("test");
      
        }
      
      } 
      
    2. Save it like Hello.java

    3. Go to Console and compile it like

    javac Hello.java

    1. Execute the code like

    java Hello

    Should be no error.

提交回复
热议问题