Failed to create the Java Virtual Machine - after new install on XP

I just installed Titanium Studio on Windows XP.
I followed the instructions here ( which basically said download and run the installer.
When I try to run Titanium Studio, I get a popup saying 'Failed to create the Java Virtual Machine'
The only answers on this forum I have found has to do with Win7 and says
"remove –launcher.XXMaxPermSize 256m from titaniumstudio.ini and start again"
I tried this but it doesn't make any difference.
I tried uninstalling and reinstalling
Any help please? What am I missing?

12 Answers

  • Accepted Answer

    Hmm, I thought I posted my resolution here about an hour ago - but no… (not sure where I posted it!!!) but was definitely not a DOH!


    After a ton of searching and testing and trying a gagillion things, I added –debug to the titaniumstudio.exe and got some more info then just ‘Failed to create the Java Virtual Machine’ (pretty useless error message)

    I saw the error message - ‘could not reserve enough space for object heap’
    So more searching and testing, I tried changing a line in the titaniumstudio.ini




    And that worked.

    Like I said, definitely not a DOH!

    The installation documentation for this product really needs some work. Currently it says, download and install and good to go! Obviously NOT true! Almost 5 hours trying to get this to work… seriously frustrating. I hope development in this goes a lot smoother!

    — answered 4 years ago by Karen K
    • Why can't you mark your own answer as the best answer, since I ended up solving it myself??

      — commented 4 years ago by Karen K
    • Very good, thank you. Is there an explanation for this setting? Maybe someone from Appcelerator? Thank you again, you obviously saved me 5 hours :)

      — commented 4 years ago by adrian rosian
    • Worked for me also, but it was enough to reduce the memory requirements to 512, instead of 256MB.

      — commented 4 years ago by Andrea Santambrogio
    • Worked for me too.

      Used -Xmx512m

      But after running update had to do it again!

      — commented 4 years ago by Robert Sausman
    • The main reason this happens is that you simply do not have enough available memory. For instance, my work machine has 4GB of RAM. However, with my normal work applications open and two virtual machines, I had well under 1GB of RAM free.

      Using the default -Xmx1024m, my machine needed well over 1GB of RAM to be free for Titanium. After a reboot and without starting up my VM's, I was able to use Titanium without issue.

      However, changing from Xmx1024m to Xmx256m or Xmx512m should be fine for most people. You will run into performance issues though if your project becomes bigger and bigger. It all comes down to buying/freeing up more RAM if your project requires it.

      — commented 2 years ago by Jeremy Hendricks
    • Bravo, Thank You!

      I tried to find the link but i think it was the first page that comes up after you click download. I Remember seeing if XP 32 bit 2 GB of continuous free ram needed or recommended….
      Titanium studio now running on m single core 1.5gb RAM pc 2700 machine…. bleh…

      Thank you for the awesome ini fix!

      — commented 2 years ago by CHRISTOPHER Boddie
  • At first no, because nowhere in the instructions does it say I need to install java first. Yes I am a complete newbie to Appcelerator, installing it to learn about it and start on a new project.
    But after reading the error message I thought that might be the case, so I did install it. I un-installed Titanium and re-installed Java and re-installed Titanium, but am still getting the error.
    My Java version (installed today).
    java version "1.6.0_26"
    Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
    Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

  • Did you install java correctly first?

  • I have made sure java and javac are in the PATH.
    I can compile and run a simple HelloWorld program from the command line.
    I am not sure where else to look?

  • which package did you install? Did you set the java_home etc environment variables control panel->system ? Did you add the binary directory(s) to the path ? (I do both because I dont like to get too frustrated whenever possible)

    — answered 4 years ago by Steve Hovey
    1 Comment
    • Thanks for the suggestions and help!

      — commented 4 years ago by Karen K
  • doh sorry I see you said you set the path (long day here).. dont give up! we all start at the start.. find the issue.. and say - DOH! :)

  • Youre good! :) I think the ti people figure if its community we should be doc'ing ourselves.

    or something.. I have read some nasties by googling.. BUT I like this tool for developing (so far) now that Ive gotten this far in my learning curve.

    I wonder where you did post your solution the first time.. someone must be wondering what ur smokin! :) HAHA!

  • I just installed java and Titanium Studio still runs - so that is why it is not in the instructions, because you don't need to install it.

  • Till date this same problem can be solved by Karen K's answer. Thanks Karen!

  • But I don't search the: failed create the java virtual maccine in win 7

  • Thanks a lot !! Its working Karen K