簡體   English   中英

另一個“ java.exe”未被識別為內部或外部命令

[英]another '“java.exe”' is not recognized as an internal or external command

由於我在兩個多小時內一直在為此苦苦掙扎,因此我急切地發布了這個問題,

當我嘗試在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卻說這不能識別為內部或外部命令?

有人可以幫忙嗎?

我通過安裝Java Runtime 32解決了這個問題,這在使用FlashDevelop時很重要

如果您在Windows Box中安裝了cygwin,或者使用UNIX Shell,則

Issue bash#which java

這將告訴您java是否在類路徑中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM