2013-02-25 61 views
2

正如我一直爲此而努力了兩個多小時,我拼命張貼這個問題,另一個「‘的java.exe’」不被識別爲一個內部或外部命令

當我嘗試建立一個項目NME在FlashDevelop中,我得到這個錯誤:

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表示不會將其識別爲內部或外部命令?

任何人都可以提供幫助嗎?

+0

我假設'java.exe'沒有在'Build.xml'中正確配置。 – 2013-02-25 09:55:42

+0

你可以發佈你的'Build.xml'嗎? – Michael 2013-02-25 09:58:03

+0

我沒有使用自定義生成,我在一個nmml文件上,我通過安裝Java Runtime 32解決了這個問題,但是現在我又發生了一個錯誤:無法找到tools.jar。預計會在C:\ Program Files文件(x86)\ Java \ jre7 \ lib \ tools.jar中找到它,爲什麼它在jre7中搜索?! – simo 2013-02-25 11:57:05

回答

0

我使用的FlashDevelop

+0

您可以正確定義JAVA_HOME和JDK_HOME,但也可以使用64位版本,但FlashDevelop社區建議32位。 – 2013-02-25 17:16:50

+0

JAVA_HOME和JDK_HOME有什麼區別? – simo 2013-02-26 07:57:34

+0

JDK_HOME用於Java Deevlopment Kit(JDK)又名JavaSE,JAVA_HOME可以與Java運行時(JRE)和JDK一起使用(如果只存在一個)。 – 2013-02-26 10:21:19

0

,如果你已經安裝了cygwin在Windows中,或使用UNIX殼牌然後

Issue bash#which java 

這會告訴你是否通過安裝Java運行時32解決了這個問題,其重要java在你的類路徑或NOT中。

相關問題