Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1892] "Missing Java SDK" error when upgrading Titanium Studio (instead of fresh install)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2013-05-31T21:46:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio
Labelsn/a
ReporterEric Wing
AssigneeDaniel Sefton
Created2013-05-23T04:33:12.000+0000
Updated2016-03-08T07:40:48.000+0000

Description

I am trying to build a basic Android application using Titanium Studio using the Single Window application template. I am borrowing a Windows 7 machine from Russ McMahon which already had Titanium Studio installed some time ago. I updated his Titanium Studio to the latest stable version as of today. (3.1.0.GA I believe) to the point where no more updates are available. I installed the latest Android SDK and NDK (20130514 (installed API 17 and 8), NDK r8e) and setup the paths in Titanium Studio Preferences. After creating a new Single Window project, I am getting the following error when trying to build for the Android Emulator. (I did create an Emulator image.) Titanium Command-Line Interface, CLI version 3.1.0, Titanium SDK version 3.1.0.GA [ERROR] :  "Missing Java SDK. Please make sure Java SDK is on your PATH Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved. [ERROR] Application Installer abnormal process termination. Process exit value was 1 What is particularly strange is when I do a brand new Windows 8 installation in Virtual Box with a fresh Titanium install and the same Android SDK/NDK, I don't get this "Missing Java SDK" error. I was asked to report this bug. (You might need to talk to Russ about details of his machine setup.) Russ did confirm his Java is installed and in his path and wanted me to include the below. C:\Users\Russ>java --version Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. C:\Users\Russ>path PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32 \WindowsPowerShell\v1.0\;C:\Program Files (x86)\Java\jre7\bin\;C:\Program Files (x86)\nodejs\;C:\Users\Russ\AppData\Roaming\npm\

Comments

  1. Daniel Sefton 2013-05-23

    Hi Eric, Before I look deeper into this, there's a problem with the command you entered to get the Java version. It should be:
    java -version
    Also run:
    javac -version
    Thanks.
  2. Eric Wing 2013-05-23

    java version "1.7.0_21" Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing) javac wasn't found. ------ On the fresh install system which doesn't have this problem, it says java version "1.6.0_25" and javac 1.6.0_25
  3. Daniel Sefton 2013-05-23

    Hi Eric, You'll find this guide useful: http://developer.appcelerator.com/doc/mobile/mobile-build-windows Sources say that Java 1.6 is required; I haven't actually tried it with 1.7 myself though. I have a feeling it might work, but it does need to be able to locate javac. It also took me a while to get the environment variable paths right for it to be able to locate javac. Add this to your "System variables" "Path":
    %JAVA_HOME%\bin;
    Add this variable to your "System variables":
    JAVA_HOME
    C:\Java\jdk1.7.0_21
  4. Eric Wing 2013-05-23

    Okay. This was not my computer. I was trying to diagnose a different install error. They wanted me to try on a direct install instead of a virtual machine. This led me to this error and a completely different set of errors. FYI, the Android team said at Google I/O they already fixed the 1.7 incompatibility problems and already ships in their tools (r22?).
  5. Daniel Sefton 2013-05-23

    So are you going to try what I suggested? Btw, you may also run into a different bug with the new r22 toolset changes, which we fixed in TIMOB-13944. A workaround is included.
  6. Eric Wing 2013-05-24

  7. Daniel Sefton 2013-05-24

    Hi Eric, As you probably saw we fixed the build for Windows in TIMOB-13944. Let me know if it works. Thanks.
  8. Daniel Sefton 2013-05-31

    I'm going to assume this was fixed. Let me know if you continue to have problems related to this. But I think you resolved the "missing java SDK" error; and the NodeType error has been resolved on Windows by our team; any new unrelated problems with your installation and you should probably open a new report. Cheers.

JSON Source