另一个'“java.exe”'未被识别为内部或外部命令

时间:2013-02-25 09:25:02

标签: java environment-variables flashdevelop haxe nme

由于我在这两个多小时内一直在努力,我拼命地发布了这个问题,

当我尝试在FlashDevelop中构建NME项目时,我收到此错误:

Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\KETAB\Desktop\SplashScreen\SplashScreen.hxproj" -ipc 41740bf7-6aa9-4825-9b1d-a8450386e5ad -version "2.10" -compiler "C:\Motion-Twin\Haxe" -library "C:\Program Files (x86)\FlashDevelop\Library" -target "android"
Building SplashScreen
haxelib run nme build C:\Users\KETAB\Desktop\SplashScreen\application.nmml android -debug
haxelib run hxcpp Build.xml haxe -Ddebug -Dandroid -Dcpp -Ddebug -Dhaxe_208 -Dhaxe_209 -Dhaxe_210 -Dmobile -Dnme -Dnme_install_tool -Dsys -Dtrue
'"java.exe"' is not recognized as an internal or external command,
operable program or batch file.
Build halted with errors (haxelib.exe).

虽然在终端中,如果我输入java,我会得到友好的帮助行..

C:\Users\KETAB>java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -server       to select the "server" VM
    -hotspot      is a synonym for the "server" VM  [deprecated]
                  The default VM is server.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument

    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for m
ore details.

我在环境变量中试过这个:

PATH C:\Program Files (x86)\Java\jdk1.7.0_13\bin
JAVA_HOME C:\Program Files (x86)\Java\jdk1.7.0_13

为什么我可以在终端内部调用java,而FlashDevelop表示不能将其识别为内部或外部命令?

任何人都可以提供帮助吗?

2 个答案:

答案 0 :(得分:0)

我通过安装Java Runtime 32解决了这个问题,这在使用FlashDevelop时很重要

答案 1 :(得分:0)

如果你在Windows Box中安装了cygwin,或者使用UNIX Shell,那么

Issue bash#which java

这将告诉您java是否在您的类路径中。或者不是。

相关问题