我使用的是Windows 7,我使用的是eclipse kepler和Java 7以及JRE 7(64位)。
我的ant build不在这种环境中运行。我设置了路径和环境变量。我已经定义了类路径,ANT_HOME,我的tools.jar也可用。但是当我运行build.xml时,它说
mxml:
Error: could not find JRE
Error: could not find Java 2 Runtime Environment.
BUILD FAILED
D:\\build.xml:5: exec returned: 2
Total time: 945 milliseconds
我定义的JRE是JRE 7.但是如何得到这个错误?它是如何指向JRE 2的?
答案 0 :(得分:0)
嗯,因为你使用exec执行另一个程序,所以不是Ant的错误。
信息很少,我想你试着调用mxmlc。您可能需要为其设置Java运行时。根据{{3}}:
To do so, you'll need to edit the jvm.config file located in FLEX_HOME\bin. Within jvm.config, set java.home to the location of a 32bit JRE. If you don't already have a 32bit JRE, download it.
Example:
java.home=C:/Program Files (x86)/Java/jre6