It’s Wednesday and time for another frequently asked questions (FAQs) session. Here are some FAQs about Java and the Windows Simulator.
1. Java 7 is the most recent version of Java, why does Corona SDK require Java 6?
Developing for Android requires Java 6, not Java 7 (according to the Android site). Corona SDK uses the Java tools for signing the APK, so we have the same requirements as if you were doing native Android development.
When you run Corona SDK and try to do a build, it checks to see if Java 6 is installed. If it doesn’t find Java 6, you will be prompted to install Java 6.
Note: Starting with Build 1103, we found a way to make Corona SDK run with Java 7, so now both the Mac and Windows Simulators can run with either Java 6 or Java 7 installed.
2. I keep getting a message on my Windows machine saying Java wants to update my Java (6) to Java 7. Should I upgrade?
If you are running the public build (971 or 1076), we don’t recommend running the Java updater because it may remove the JRE 6 binary files, causing Corona SDK build errors.
3. I can’t build for Android — the “Key Alias” field is empty
This generally means the Java 6 install is damaged. You will also get “keystore password not valid” error if you browse and select the debug keystore shipped with Corona SDK.
This can happen if you try to install Java 7 over Java 6 and the Java updater removes the JRE 6 (Java Runtime) binary files. We have seen this happen when you run Java (7) Updater 45. See question 5 for how to restore JRE 6.
4. I can’t build for Android — I get a “Could not load …/jvm.dll, error 126″ message.
We added support for Java 7 in Build 1093 but it only worked correctly if you installed Java JDK7 from Oracle’s website. We found if you installed Java 7 using the Updater 45, it would remove a key DLL file, causing the above error message when trying to do a build in the Windows simulator. The solution is to use Build 1103, which now properly locates the DLL file. (This turned out to be a known Java Updater bug.)
5. I’ve installed Java 7 so how do I get Corona SDK Build 1076 working again?
Installing the Java 7 Updater removes the JRE 6 binary files but leaves the JRE 6 key in the Windows Registry making Corona SDK think Java 6 is installed. The solution is to re-install Java 6 JRE files. You can download JRE 6 here. Make sure you pick the 32-bit version for Windows (Windows X86).
Once you’ve run the Java 7 Updater and re-installed the JRE 6 files, you can build with both the public releases and the latest Corona SDK Daily Builds (starting with Build 1103).
That’s it for today’s questions. I hope you enjoyed them and even learned a few things!
Posted by Tom Newman. Thanks for reading...