2

When starting Selenium I get this error:

Starting Selenium Server failed. Check that you have Java 1.5 or newer installed by running java -version on the command prompt.

Running java -version I get this the output

java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

1.7 is newer than 1.5 but Selenium doesn't believe it. How can I make Selenium to start with 1.7? Or 1.6 or 1.8 (I have them too)?

Ramhound
  • 44,080

1 Answers1

0

The error message was misleading. The reason was not an older Java version but wrong value for Selenium environment parameter JAVA_HOME which was set to

 JAVA_HOME=C:\Program Files\Java\jrk1.7.0_75

Looking for a solution for another problem today I had installed and deinstalled several versions of Java so I don't have jrk1.7.0_75 any more. Changing this value to one of the installed versions (f.e. JAVA_HOME=C:\Program Files\Java\jrk1.8.0_60) will solve the problem.