Affects Version/s: Titanium Studio 2.1.1
Titanium Studio, Build: 126.96.36.199207171343
While testing "Build Acceptance
TIMOB-7472-A Android Only", I attempted to build a default Titanium Mobile app (just the standard template) and I encounter the following problem:
I check and the $JAVA_HOME is set, but was not available to the Python script. Studio should check for the JAVA_HOME before beginning a build, check if it is correctly set, and if it is missing or incorrect pass in a correct version into the build.
This issue is a not a regression since the bug is due to a user mis-configuration of JAVA_HOME.
Steps used to reproduce:
1. Ensure that the $JAVA_HOME global variable is set ( ls -R $JAVA_HOME ).
2. Create a new Titanium Mobile Project.
3. Create a signing key.
4. Package for Distribution (Package > Distribute - Android App Store)
Android correctly packages and a package file is created in the specified place.
The packager gets to titanium_prep.linux64 where it can not find java as $JAVA_HOME isn't available to it.
Tested by multiple sources on Titanium Studio build 2.1.1, 2.1.0, and 2.0.2 on both Ubuntu 12.04 and 10.04, using SDK 2.1.0GA replicated the same failure. Switching back to SDK 2.0.2GA fixes the issue in all studio platforms, as 2.1.0 is the first version to use JAVA_HOME in the packaging scripts.
- See if JAVA_HOME is set in such a way that the scripts can read it
- If it is, check if the JAVA_HOME variable is correct by checking for /lib/tools.jar at that path
- If it is incorrectly set, or not set, infer the JAVA_HOME location by using values from Studio's environment.