VVV
VVV

Reputation: 68

Failed to start an Appium session.Error was: Error: 'java -version' failed

While running the application in Eclipse, I got error message as:

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: 'java -version' failed. Error: Command failed: Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll Error: Could not find Java SE Runtime Environment.

and in appium console it showing as Failed to start an Appium session, err was:

Error: 'java -version' failed. Error: Command failed: Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll Error: Could not find Java SE Runtime Environment.

I checked all the java path in system and looks its correct.

Upvotes: 0

Views: 1146

Answers (3)

nagarjuna p
nagarjuna p

Reputation: 11

please check in your mission jdk, android and appium install or not for that use this commends.

use this commends go to cmd type:java---it will opened.after type android when ever your check the android at the time sdk manager will be opened if u r see the cmd one message has displayed the message is xcopy is missing which is available in system32 folder copy the link and set the path before the jdk it will works

Upvotes: 1

VVV
VVV

Reputation: 68

After research, I got solution for this issue. First uninstall all java in control panel and reinstall with latest version.

Upvotes: 0

Stan
Stan

Reputation: 3461

Your JDK installation is broken, could be a lot of things:

  • Probably you have x64 JDK, but in your Windows\System32 folder you have old java x32 java.exe, javaw.exe, javaws.exe, javap.exe and javac.exe You should delete them.

If not solved:

  • delete Software\JavaSoft\Java Runtime Environment keys from registry

In any case after these steps you will need to reinstall JDK

Upvotes: 0

Related Questions