无法运行JAVA即使路径设置在Windows 8企业 - 科尔多瓦 [英] Failed to run JAVA even though path is set on Windows 8 Enterprise - Cordova

查看:197
本文介绍了无法运行JAVA即使路径设置在Windows 8企业 - 科尔多瓦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了新的离子/科尔多瓦项目,我想在Windows 8.1构建它。我安装了JDK和JRE 7以及Android SDK和Ant和使用下面的说明它们添加到我的道路。

I have made a new Ionic / Cordova project and I'm trying to build it on windows 8.1. I installed JDK and JRE 7 as well as android sdk and ant and added them to my path using the following instructions.

<一个href="http://stackoverflow.com/questions/20323787/cordova-platform-add-android-not-working-while-listing-android-targets/20333029#20333029">cordova平台添加机器人同时上市的Andr​​oid目标

当我执行离子平台添加的android 科尔多瓦我仍然得到以下错误:

When I execute ionic platform add android or cordova I am still getting the following error:

C:\Users\BogdanR\.cordova\lib\android\cordova\3.4.0\bin\node_modules\q\q.js:126
                    throw e;
                          ^
Error: Failed to run 'java -version', make sure your java environment is set up
including JDK and JRE.
Your JAVA_HOME variable is C:\Program Files\Java\jdk1.7.0_51
Error: Command failed: 'java' is not recognized as an internal or external command,

operable program or batch file.


    at C:\Users\BogdanR\.cordova\lib\android\cordova\3.4.0\bin\lib\check_reqs.js:62:22
    at ChildProcess.exithandler (child_process.js:641:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Socket.<anonymous> (child_process.js:956:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)
Error: cmd: Command failed with exit code 8
    at ChildProcess.whenDone (C:\nodist\bin\node_modules\cordova\src\superspawn.js:112:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Unable to add platform android. Please see console for more info.

我尝试修改两个系统变量和用户PATH变量。

I tried modifying both system variables and user PATH variables.

奇怪的是,我可以键入 Java的版本和它的作品:

THE WEIRD THING is that I can type in java -version and it works:

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

我使用nodist管理NPM,如果这是任何意义的。

I am using nodist to manage npm if that is of any relevance.

推荐答案

有在破坏我的整个系统路径的路径错误项。

There was a bad entry in the path that corrupted my whole system path.

C:\ Program Files文件\ Microsoft SQL Server的\ 110 \ TOOLS \ BINN; C:\ Program Files文件\微软\ Web平台安装程序\;

好像那个引号是SQL Server安装或网络平台增加了一个入口。我从来不添加那些路径所以它可能是安装人员的错吗?

Seems like that quotation mark is an entry added by SQL Server installation or web platform. I never added those to the path so it might be the installers fault?

这篇关于无法运行JAVA即使路径设置在Windows 8企业 - 科尔多瓦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆