Builds fine for local device, but 'JAVA_HOME' error distributing to store

You must Login before you can answer or comment on any questions.

I can run on it directly on an Android device, but when I build to distribute to the Android App Store, I get this error:

"[ERROR] Program launch failed. Unable to locate Java VM. Please set JAVA_HOME environment variable. [ERROR] Unabled to prepare JavaScript for packaging. Error code 4."

THE JAVA_HOME variable seems to be set fine.

The console dump can be found at http://pastie.org/4400833.

Any ideas why this happening?

Thanks!

— asked 11 months ago by Jake Horner
1 Comment
  • Sorry, forgot to mention I'm working on a windows machine. Also, I get the same result regardless of Titanium SDK version (1.8.2 through 2.1.1.GA).

    — commented 11 months ago by Jake Horner

5 Answers

I don't know if you ever solved this, but I just had the exact same issue and the problem apparently was that my JDK was in my "Program Files", I then tried installing the newest JDK (for x86) to "Program Files (x86)" and added that to my "Path" environmental variables. That solved it.

It works for me too. It should be x86 version installed in default dir. Works both for java 1.6 and 1.7.

I believe it's x86 engine, not directory location itself.

64 bit version of Java simply not works with Titanium Studion. Now I have two versions of Java on my PC. Regular 64 bit for all software, and x86 version for Titanium Studio. I created BAT file to run Titanium Studio: " SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_17 CALL "C:\installed\Titanium Studio\TitaniumStudio.exe" " Works fine.

Your Answer

Think you can help? Login to answer this question!