新手求解appium+python 运行程序就报错 C:\Windows\system32\cmd.exe /s /c "java -version"

木木不杀你 2018-03-08 05:38:01
selenium.common.exceptions.SessionNotCreatedException: Message: A new session could not be created. (Original error: 'java -version' failed. Error: Command failed: C:\Windows\system32\cmd.exe /s /c "java -version"
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

python是3.5 java1.8 win10 64位 反复下载重装已经整了一天了到最后还是这个报错,始终不知道怎么搞了。java环境变量好的
cmd 运行 java -version 和 javac -version都正常
有哪位大神知道这是什么问题么?看了一天全是java环境没搭好 或者64跟32位的问题 我都试了不行哎。。。
...全文
806 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
木木不杀你 2018-03-09
  • 打赏
  • 举报
回复
.....问题已经解决,系统变量CLASSPATH设置错误,然后电脑上装了9.0跟8.0两个版本的java 就这么好了
木木不杀你 2018-03-08
  • 打赏
  • 举报
回复
这是appium 日志:希望能给到参考 > info: --> POST /wd/hub/session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"browserVersion":"7.0","platformName":"Android","browserName":""}},"desiredCapabilities":{"appPackage":"com.live91y.tv","platformName":"Android","deviceName":"VIE-AL10C00B356","version":"7.0","browserName":"","device":"android","appActivity":"org.cocos2dx.cpp.AppActivity"}} > info: Client User-Agent string: Python http auth > info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : version, device > info: [debug] Didn't get app but did get Android package, will attempt to launch it on the device > info: [debug] Creating new appium session d8e4784f-721e-4cbd-bf29-4f9279673c71 > info: Starting android appium > info: [debug] Getting Java version > info: [debug] Cleaning up android objects > info: [debug] Cleaning up appium session > error: Failed to start an Appium session, err was: Error: 'java -version' failed. Error: Command failed: C:\Windows\system32\cmd.exe /s /c "java -version" > Error: opening registry key 'Software\JavaSoft\Java Runtime Environment' > Error: could not find java.dll > Error: Could not find Java SE Runtime Environment. > > info: [debug] Error: 'java -version' failed. Error: Command failed: C:\Windows\system32\cmd.exe /s /c "java -version" > Error: opening registry key 'Software\JavaSoft\Java Runtime Environment' > Error: could not find java.dll > Error: Could not find Java SE Runtime Environment. > > at [object Object].<anonymous> (D:\appium\Appium\node_modules\appium\lib\devices\android\android-common.js:1057:17) > at ChildProcess.exithandler (child_process.js:758:5) > at ChildProcess.emit (events.js:110:17) > at maybeClose (child_process.js:1016:16) > at Process.ChildProcess._handle.onexit (child_process.js:1088:5) > info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: 'java -version' failed. Error: Command failed: C:\\Windows\\system32\\cmd.exe /s /c \"java -version\"\nError: opening registry key 'Software\\JavaSoft\\Java Runtime Environment'\r\nError: could not find java.dll\r\nError: Could not find Java SE Runtime Environment.\r\n)","origValue":"'java -version' failed. Error: Command failed: C:\\Windows\\system32\\cmd.exe /s /c \"java -version\"\nError: opening registry key 'Software\\JavaSoft\\Java Runtime Environment'\r\nError: could not find java.dll\r\nError: Could not find Java SE Runtime Environment.\r\n"},"sessionId":null} > info: <-- POST /wd/hub/session 500 89.327 ms - 660

50,631

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧