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
  • 41,734
  • 35
  • 103
  • 130
Johannes Tue
  • 226
  • 1
  • 3
  • 13
  • What 32-bit versions of Java do you have installed? If I were to hazard to guess your attempting to run a 32-bit version of Selenium but only have a 64-bit version of Java ( which by the way is still out of date ). – Ramhound Feb 09 '16 at 15:04
  • @Ramhound I have 32-bit: jdk1.6.0_37, jre1.6.0_07 and jre1.8.0_73. I know that 1.7 and 1.6 are not the newest but I need these older versions for other tools. – Johannes Tue Feb 09 '16 at 15:05
  • You have `jre1.7.0_75-b13` not `jre1.8.0_73` per your output. In other words you have Java 7 installed not Java 8. You need to verify what you actually have installed because you don't seem to know since your now saying you have an entirely different version installed. – Ramhound Feb 09 '16 at 15:10
  • @Ramhound The problem is solved, i'll edit my question now. – Johannes Tue Feb 09 '16 at 15:16
  • Just mark your answer as the solution. Adding "solved" to the title isn't required nor suggested. – Ramhound Feb 09 '16 at 15:30

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.

Johannes Tue
  • 226
  • 1
  • 3
  • 13