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
I had the same issue on Windows 7 and I had to install both JDK and JRE and it's a success.
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
Uninstall all Java packages of all versions.
Download last packages Java SE or JRE for your 32 or 64 Windows and install it.
First install JRE and second is Java SE.
Open text editor and paste this code.
public class Hello {
public static void main(String[] args) {
System.out.println("test");
}
}
Save it like Hello.java
Go to Console and compile it like
javac Hello.java
java Hello
Should be no error.
Check that downloaded eclipse/JDK/JRE is compatible with your processor/OS architecture that is are they 32bit or 64bit?
Try placing the desired java directory in PATH before not needed java directories in your PATH.
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
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