0

I'm using Windows 7, I use eclipse kepler and Java 7 and JRE 7(64 -bit).

My ant build is not running in this environment. I have set path and environmental variables. I have defined class path, ANT_HOME, my tools.jar is also available. But still when I run build.xml it says

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 I defined is JRE 7. but how do I get this error? How is it pointing to JRE 2

greg-449
  • 109,219
  • 232
  • 102
  • 145

1 Answers1

0

Well, it's not Ant's fault since you execute another program using exec.

With little information, I guess you try to invoke mxmlc. You might need to set the Java runtime for it. According to MXMLC and 64bit JRE:

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
Community
  • 1
  • 1