Unable to compile NME for Android
Asked Answered
R

1

6

Okay, so I'm trying to get an initial build of the NME sample files onto an Android device.

I can build for platforms such as HTML5, Flash and Windows, but I can't get it onto Android - I always get errors back that say:

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
Is is currently set to "C:\Program Files (x86)\Java\jre7"

Okay - obvious enough right? But I've checked, rechecked, restarted, edited environment variables and made absolutely sure that the JAVA_HOME variable is actually pointing at the JDK.

Any explanations?

Rubirubia answered 7/10, 2012 at 18:37 Comment(0)
R
12

Well, to answer my own question, I eventually found that there's an .hxcpp_config.xml file in my user account (C:\Users\James\), and that has an XML node which looked like this:

<set name="JAVA_HOME" value="/SDKs//java_jdk" />

I've changed it to this:

<set name="JAVA_HOME" value="C:\Program Files (x86)\Java\jdk1.6.0_29" />

And it works!

Rubirubia answered 7/10, 2012 at 18:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.