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

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

    I had the same issue on Windows 7 and I had to install both JDK and JRE and it's a success.

    0 讨论(0)
  • 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.

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

    Check that downloaded eclipse/JDK/JRE is compatible with your processor/OS architecture that is are they 32bit or 64bit?

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

    Try placing the desired java directory in PATH before not needed java directories in your PATH.

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

    please try to execute java from

    C:\Program Files\Java\jdk1.7.0_10\bin

    i.e from the location where java is installed.

    If it is successful, it means that the error lies somewhere in the classpath.

    Also, this guy seems to have had the same problem as yours, check it out

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

    Not able to run Appium {“message”:”A new session could not be created. (Original error: ‘java -version’ failed

    I used Jdk 1.8 and JRE 1.8, Classpath is also set properly but I observed that Java command gives Error to initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)

    Solution:
    Uninstalled JRE and JDK completely 
    Installed JRE 1.8 then
    Installed JDK 1.8 
    Set Classpath
    check Java command works or not and its working 
    also able to execute the Appium program thru Eclipse Kepler Service Release 2 with JDK1.8 support
    
    0 讨论(0)
提交回复
热议问题