How To Point The Simulator To A Specific Jdk

I have both jdk1.6 and 1.7 installed in my computer. Since the simulator can only build using 1.6, how do I point it to my jdk1.6 folder?  

When I go to File->Build for Android I get the message “Cannot find the Java Development Kit …”.  I assume it’s because the default JDK in my machine is 1.7.

Note: I need to keep both jdk versions in my computer since I use each one for different applications.

Hi. Make sure your JAVA_HOME environment variable is set to your 1.6 folder. Here is a link that might help: http://docs.oracle.com/cd/E19509-01/820-3208/inst_cli_jdk_javahome_t/

Regards,

Kevin

I assume that you are talking about the Windows version of the Corona Simulator.

Corona does not use the JAVA_HOME environment variable.  In fact, Corona does not require you to touch environment variables at all.

The Corona Simulator finds the JDK 6’s path via the Windows registry.

The most likely problem is that you have installed the 64-bit version of the JDK 6.  Corona (and likewise Android) requires the 32-bit version (x86) version of the JDK 6.  Install that version from Oracle’s website and Corona will then be able to do Android builds.

You’ll want to click on the JDK Download button under the Java SE 6 section on the following website.  Make sure to click on the “Windows x86” download link from there.

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Thanks for the correction, Joshua. I’m on Mac OS X, and changing JAVA_HOME as well as my PATH worked for me.

Regards,

Kevin

Oh I see.  Yeah, for Mac that makes sense.  Mac doesn’t seem to easily support both JDK 6 and 7 at the same time.  But on Windows, having multiple JDK/JRE versions is quite common and there is a much stronger need for backward compatibility.

In any case, thanks for posting that anyways.  If Rex is on a Mac, then I’m sure that’ll help.

Thank you all for your comments.  I was able to resolve my issue by installing the 32 bit version of the JDK and having Windows point to that installation via environment settings.

Sweet!

Hi. Make sure your JAVA_HOME environment variable is set to your 1.6 folder. Here is a link that might help: http://docs.oracle.com/cd/E19509-01/820-3208/inst_cli_jdk_javahome_t/

Regards,

Kevin

I assume that you are talking about the Windows version of the Corona Simulator.

Corona does not use the JAVA_HOME environment variable.  In fact, Corona does not require you to touch environment variables at all.

The Corona Simulator finds the JDK 6’s path via the Windows registry.

The most likely problem is that you have installed the 64-bit version of the JDK 6.  Corona (and likewise Android) requires the 32-bit version (x86) version of the JDK 6.  Install that version from Oracle’s website and Corona will then be able to do Android builds.

You’ll want to click on the JDK Download button under the Java SE 6 section on the following website.  Make sure to click on the “Windows x86” download link from there.

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Thanks for the correction, Joshua. I’m on Mac OS X, and changing JAVA_HOME as well as my PATH worked for me.

Regards,

Kevin

Oh I see.  Yeah, for Mac that makes sense.  Mac doesn’t seem to easily support both JDK 6 and 7 at the same time.  But on Windows, having multiple JDK/JRE versions is quite common and there is a much stronger need for backward compatibility.

In any case, thanks for posting that anyways.  If Rex is on a Mac, then I’m sure that’ll help.

Thank you all for your comments.  I was able to resolve my issue by installing the 32 bit version of the JDK and having Windows point to that installation via environment settings.

Sweet!