Search code examples
javaseleniumappiumappium-android

Facing javapath error while executing appium script


I have Given Correct JAVA_Home path: C:\Program Files\Java\jdk1.8.0_131\bin

Able to run the Normal JAVA program. But getting an issue while executing Mobile Test script using Appium.

Console:

remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. 

Original error: Could not sign with default certificate.

Original error Command 'C:\Program Files\Java\jdk1.8.0_131\bin\bin\java.exe' not found. Is it installed?
    at getResponseForW3CError (C:\Users\venky\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
    at asyncHandler (C:\Users\venky\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:392:37)

Solution

  • JAVA_HOME should be C:\Program Files\Java\jdk1.8.0_131, without the bin part. Note that your program is trying to run C:\Program Files\Java\jdk1.8.0_131\bin\bin\java.exe - the bin\bin is wrong.