title: Error running Android emulator from Titanium Studio
body: <p>Basically trying to get the <a href="https://github.com/appcelerator/KitchenSink" rel="nofollow">default sample project</a> (which is <a href="https://wiki.appcelerator.org/display/guides/Example+Applications" rel="nofollow">linked to here</a>) to run in the Android simulator.</p>
  
  <p>(I'm on Windows XP-SP3, see the "Diagnostics Log" output in the question's footer for more config info, if you have any questions about configs let me know.)</p>
  
  <p>Here's what I've done so far:</p>
  
  <ul>
  <li>Installed the current version of Titanium Mobile SDK Version: 2.0.1</li>
  <li>Installed the Java SDK "jdk-6u31-windows-i586.exe"</li>
  <li>Installed the Android SDK Manager r18, then the following packages: Android SDK Tools, Android SDK Platform Tools, Android 2.2 API-8 SDK Platform, Android 2.2 API-8 Google APIs</li>
  <li>Downloaded the zip of Kitchen Sink on GitHub, unzipped the file, changed the file name to KitchenSink, copied the file to the Titanium project directory under "My Documents", then via the file tab executed an import on that directory to the "Project Explorer" tab in Titanium Studio.</li>
  <li>Then I right clicked on the KitchenSink project in "Project Explorer" tab in Titanium Studio, and selected "Run As...", then "Android Emulator"</li>
  <li>Oddly, doing this returns different results (meaning I run it, restart, etc.), which include:
  <ul>
  <li><strong>ERROR-MSG:</strong> Problem Occurred 'Launching Titanium Android Emulator - KitchenSink' has encountered a problem. Session initialization failed. Connection refused: connect.</li>
  <li>Another times, I've gotten a message in this form "[INFO] [2012-04-24 17:03:33,140] Serving up files for com.test.test at 0.0.0.0:1133 from C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test" which appears to as the app was deploy to a server under an static-IP, but no emulator ever appears; which to me seemed like a bad IP address, though might be wrong.</li>
  </ul></li>
  </ul>
  
  <p><strong>What do I need to do to get KitchenSink to run in the Android Simulator? Is there a way to just run the Android Simulator to confirm it's working on it's own?</strong></p>
  
  <hr>
  
  <p>Here's the full output from the "Diagnostics Log" under the help tab:</p>
  
  <ul>
  <li><strong>Host OS:</strong> Windows XP</li>
  <li><strong>OS Arch:</strong> x86</li>
  <li><strong>JRE Version:</strong> 1.6.0_24</li>
  <li><strong>JRE Vendor:</strong> Sun Microsystems Inc.</li>
  <li><strong>JRE Home:</strong> C:\Program Files\Appcelerator\Titanium Studio\jre</li>
  <li><strong>Install Directory:</strong> file:/C:/Program Files/Appcelerator/Titanium Studio/</li>
  <li><strong>Version:</strong> 2.0.1.201204132053</li>
  <li><strong>VM Arguments:</strong> -Xms40m -Xmx1024m -Declipse.p2.unsignedPolicy=allow -Declipse.log.size.max=10000
  -Declipse.log.backup.max=5
  -Djava.awt.headless=true
  -XX:MaxPermSize=256m
  -Djava.class.path=C:\Program Files\Appcelerator\Titanium Studio\plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar</li>
  <li><strong>Workspace Directory:</strong> file:/C:/Documents and Settings/user/My Documents/Titanium Studio Workspace/</li>
  <li><strong>Language:</strong> en_US</li>
  <li><strong>Titanium Desktop SDK Version:</strong> 1.1.0</li>
  <li><strong>Titanium Desktop SDK Location:</strong> C:\Documents and Settings\user\Application Data\Titanium\sdk\win32\1.1.0</li>
  <li><strong>Titanium Mobile SDK Version:</strong> 2.0.1</li>
  <li><strong>Mobile SDK Modules API Version:</strong> 2</li>
  <li><strong>Mobile SDK Timestamp:</strong> 04/12/12 16:33</li>
  <li><strong>Mobile SDK Build Number:</strong> 999c68a</li>
  <li><strong>Titanium Mobile SDK Location:</strong> C:\Documents and Settings\user\Application Data\Titanium\mobilesdk\win32\2.0.1.GA2</li>
  </ul>
  
  <hr>
  
  <p>Per the suggestion below, I created a new mobile project targeting Android, and then ran the project using the "Run As..." Android emulator option. The system returned this messages: "[INFO] [2012-04-24 17:03:33,140] Serving up files for com.test.test at 0.0.0.0:1133 from C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test"</p>
  
  <p><strong>build.log Output:</strong>
  C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test\build.log</p>
  
  <pre><code>Logfile initialized
  [INFO] logfile = C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test\build.log
  [DEBUG] C:\Documents and Settings\user\Application Data\Titanium\mobilesdk\win32\2.0.1.GA2\android\builder.py simulator test C:\Program Files\Android\android-sdk C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test com.test.test 1 HVGA
  [INFO] logfile = C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test\build.log
  [DEBUG] C:\Documents and Settings\user\Application Data\Titanium\mobilesdk\win32\2.0.1.GA2\android\builder.py emulator test C:\Program Files\Android\android-sdk C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test com.test.test 1 HVGA
  [ERROR] Error locating JDK: set $JAVA_HOME or put javac and jarsigner on your $PATH
  [ERROR] Error locating JDK: set $JAVA_HOME or put javac and jarsigner on your $PATH
  </code></pre>
  
  <p>**Windows commands (java,javac,jarsigner) all return valid responses, which appears to conflict with the build.log file saying the JDK is not in the file path. The path is currently set as: </p>
  
  <pre><code>%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;"C:\Program Files\Java\jdk1.6.0_31\bin"
  </code></pre>
  
  <hr>
  
  <p><strong>UPDATE:</strong></p>
  
  <pre><code>Logfile initialized
  [INFO] logfile = C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test3\build.log
  [DEBUG] C:\Documents and Settings\user\Application Data\Titanium\mobilesdk\win32\2.0.1.GA2\android\builder.py simulator test3 C:\Program Files\Android\android-sdk C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test3 com.tester.test3 1 HVGA
  [INFO] Building test3 for Android ... one moment
  [ERROR] JDK version 'javac' is not recognized as an internal or external command,
  
  operable program or batch file. detected, but 1.6 is required
  </code></pre>