Eclipse: Failed to create Java Virtual Machine


Just downloaded the latest version of Eclipse version 3.6.1 from Eclipse.org. After zip file extraction, I was ready to check out the latest Eclipse; unexpectedly, I ran into an error prompt read as “Failed to create Java Virtual Machine”. Bam, why?!?!

After some tinkering, I was lead to the eclipse.ini file and found out some add-on configuration added in this latest version. "–launcher.XXMaxPermSize”. By removing the dafault value 256m, I’m now able to run it. :)

My eclipse.ini file now read as below:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
–launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx384m

For more information about the latest eclipse.ini, check out the link below:

http://wiki.eclipse.org/Eclipse.ini

http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_available_to_Eclipse%3F

 

 

I don’t get paid for writing blog posts. Your “Votes” and “Like” is my only motivation, so please “Like” it if you found this information useful. Cheers!!!

Check out what other says about this post by clicking at the title of this post.

About these ads

Tagged: ,

111 thoughts on “Eclipse: Failed to create Java Virtual Machine

  1. fangzx October 4, 2010 at 8:59 am

    Thanks!

  2. nemanja i nebojsa October 14, 2010 at 2:52 am

    cheers mate :)

  3. Greg October 14, 2010 at 10:06 am

    Fixed my problem, thanks!

  4. Jerry October 14, 2010 at 7:37 pm

    This initially fixed my issue, but then Eclipse crashed soon after and now I get the issue again. And this time I can’t get past it!

    I have no idea how this happened all of a sudden.

  5. jeeshenlee October 14, 2010 at 8:14 pm

    Jerry, which version of Eclipse you downloaded? Did you tried to re-install your Java virtual machine?

  6. datha October 19, 2010 at 10:54 am

    Thank you very much.

    It’s work!!

  7. Subbu October 29, 2010 at 12:08 am

    I had the same problem after increasing my heap size in the ini file. After I removed the default value for the perm size it worked fine.

    Thanks you.

  8. Luis November 8, 2010 at 9:36 am

    Thanks, your advice helped me.

    I am just wondering how the –launcher.XXMaxPermSize 256m got into the eclipse.ini file, because I never changed the file myself.

  9. jeeshenlee November 10, 2010 at 10:55 am

    Hellu Luis,

    Glad that it helps. The -launcher string was added by default when we download the installer from Eclipse. :)

  10. eremmel November 19, 2010 at 5:51 pm

    I noticed in combination with VE 1.5 and some open VE edit windows that this was blocking the startup of exclipse. I Applied the suggestion by removing the value 256m. But that triggers a running eclipse at 100% CPU. jvisualvm.exe showed 100% time in GC. So I changed to a value of 128m and now all started fine. jvisualvm showed that for Eclipse 3.6.1 EE and some extra plugins, I need at least 80m in Perm. The default might be too low (removing the 256m values).
    Also be careful with the -XmsNNNm option. It will be applied to each javaw.exe for each opened VE editor. So you might run out your OS memory quickly.

  11. jeeshenlee November 19, 2010 at 8:16 pm

    @Eremmel, that explain one of the question sent to me days (via email) earlier on this topic. THANKS for sharing!! Hope your input will help others as well. :)

  12. Helen November 25, 2010 at 7:08 pm

    I just wanted to thank you for creating this post – I did what you suggested and eclipse is now working fine. I’m very gratfeul!

    Helen

  13. Helen November 25, 2010 at 7:09 pm

    Thanks for creating this post. I did what you suggest and eclipse is now working fine. Thanks so much!

    Helen

  14. jeeshenlee November 25, 2010 at 10:40 pm

    @Helen, no problem. ;)

  15. pr@tt December 8, 2010 at 4:06 pm

    Thx, it’s really works!!!!!!

  16. nizam December 11, 2010 at 2:01 pm

    It really worked. Thanks a lot.

  17. carsten December 12, 2010 at 9:19 pm

    thanks!

  18. x_ninja_x December 15, 2010 at 3:11 am

    Thanks!!!

  19. PRRomaP December 26, 2010 at 8:33 pm

    GOOD & CLEAN Solution!
    Thx!

  20. PRRomaP December 26, 2010 at 8:33 pm

    GOOD & CLEAN Solution!
    Thx!

  21. Cliff December 30, 2010 at 1:37 am

    Thank you!

  22. 2010 in review by Wordpress.com « myNotes January 2, 2011 at 7:27 pm

    [...] The busiest day of the year was November 19th with 215 views. The most popular post that day was Eclipse: Failed to create Java Virtual Machine. [...]

  23. José January 8, 2011 at 7:44 am

    Thank you very much, it helps me so much!

  24. James January 23, 2011 at 3:25 pm

    Thank you for this aid. It has shortened my startup time with Eclipse immensely.

  25. dud January 30, 2011 at 6:10 pm

    thanks :D

  26. Pradnya February 3, 2011 at 2:57 pm

    Thanku so much u saved me….:)

  27. sriram February 11, 2011 at 3:52 am

    Thanks it worked. Cheers!!!

  28. foo February 17, 2011 at 9:16 pm

    Thanks :D

  29. D.D. February 23, 2011 at 7:47 am

    Ditto, this worked for me also.

  30. kvr2277 March 31, 2011 at 2:06 pm

    Thanks..

  31. Madhavan April 1, 2011 at 10:04 am

    Thanks…

  32. Sunil April 19, 2011 at 10:59 pm

    Thanks It worked

  33. Gaurav Kumar April 22, 2011 at 12:36 pm

    Thanks a lot.

    I am able to run Eclipse by removing 256M.

    Thanks again.

  34. nikhil May 6, 2011 at 4:57 pm

    Thanks a lot , i am able to run Eclipse now

  35. Carlos Cruz May 17, 2011 at 11:53 pm

    Thanks a lot.

  36. Amateur Barista May 19, 2011 at 11:28 pm

    It worked!

  37. senthil kumar May 29, 2011 at 5:57 pm

    Its working now thanks a lot :-)

  38. Pier-Luc Gagnon June 6, 2011 at 9:04 pm

    Thanks, it really saved my day!

  39. Arsen June 20, 2011 at 2:35 pm

    Thanks,
    but in my eclipse.ini file I also remove the last parameter :
    -Xmx384m,because without that it still didn’t work!
    But however thank you very much

  40. Sonia Solis June 20, 2011 at 9:39 pm

    Thanks , it worked :)

  41. rejie July 4, 2011 at 1:02 pm

    yeah just remove the default value 256 from –launcher.XXMaxPermSize 256m

    and the newly added heap size wud automatically become the default one…
    it wud wrk fine then……..Gud LUCK

  42. Jack July 6, 2011 at 8:26 pm

    Thanks. That resolved my same issue.

  43. jun July 8, 2011 at 1:22 pm

    I found that the Eclipse puts 256m on a separate line.
    I changed it to “–launcher.XXMaxPermSize 256m”

    It works too.

  44. jun July 8, 2011 at 1:39 pm

    Sorry, guys
    My bad. Please ignore my change. With the change, the Eclipse will report error at the exit time.

  45. jeeshenlee July 8, 2011 at 4:41 pm

    @Jun, thanks for sharing though ;)

  46. Dandapani Parasa July 15, 2011 at 7:01 pm

    You can also supply the VM Arguments by navigating to Window->Preferences->Java->Installed JREs and then select the (current) JRE click Edit button. Provide the VM arguments such as “-Xms256m -Xmx512m -XX:PermSize=512m” (these values changed based on your requirement) in the “Default VM Arguments” text field.

    Thanks
    Dandapani Parasa

  47. Andy Jarrell July 19, 2011 at 9:31 am

    Thank you! I just allowed one of Aptana’s updates to run. A restart of Aptana gave me that message. Making the change you suggest fixed it. Thank you, thank you!

  48. Sachin July 25, 2011 at 10:31 pm

    This actually works…Thanks a lot for great comment…This post has helped me a lot

  49. mbv July 27, 2011 at 10:43 pm

    I just had the same error, and the problem was that the line read 256M instead of 256m. That solved the problem for me.

  50. Donald August 3, 2011 at 7:27 am

    Right on the spot, thanks

  51. makertips August 16, 2011 at 8:57 am

    Thanks a lot, dude.
    This worked for me too …

  52. Narendran August 19, 2011 at 6:39 pm

    Add the -vm argument in the eclipse.ini file. Eclipse will then locate the JVM and it will work fine.

    -startup
    plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
    –launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
    -product
    org.eclipse.epp.package.jee.product
    –launcher.defaultAction
    openFile
    –launcher.XXMaxPermSize
    256M
    -showsplash
    org.eclipse.platform
    –launcher.XXMaxPermSize
    256m
    –launcher.defaultAction
    openFile
    -vm
    C:\Program Files\Java\\bin\javaw.exe
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms40m
    -Xmx512m

  53. Arka Roy (@anroy_research) August 22, 2011 at 11:46 am

    Thanks, great help there!

  54. J-Hong September 15, 2011 at 3:41 pm

    In my case, @Narendran’s way works. Thanks.

  55. Mithil September 30, 2011 at 1:05 pm

    dude.. you made my day man… after a long time.. i got this eclipse issue fixed.. thanks a lot man…:)

  56. Jens October 4, 2011 at 8:21 pm

    Thanks!

  57. whiterain November 6, 2011 at 11:53 pm

    thanks
    problem solved.

  58. Jeetendra Chauhan December 4, 2011 at 12:00 am

    Thanks, Solved My Problem

  59. Muhammad Sajjad Awan December 11, 2011 at 1:21 pm

    thanks buddy ..problem solved

  60. bihag December 28, 2011 at 3:38 pm

    thanks man, problem solved

  61. Ziggy December 29, 2011 at 6:05 am

    Thanks! I’m now verry happy! :D

  62. niks January 10, 2012 at 8:32 pm

    Works like a charm!!! Thanks…

  63. civika January 12, 2012 at 1:30 pm

    thanks buddy!!!!!! it worked:-)

  64. Kamlesh January 18, 2012 at 1:50 pm

    Thanks a lot for your information….such a nice examination

  65. raj January 26, 2012 at 1:55 am

    it worked thanks a lot. by the way how come this value gets added to the ini file?

  66. Gerardo López-Gutiérrez January 26, 2012 at 5:05 am

    Wow thanks a lot, quick fix indeed!

  67. maniper February 22, 2012 at 1:39 pm

    nice!

  68. siraykut February 22, 2012 at 3:11 pm

    Süper. Thanks for this article .

  69. Ananthan March 12, 2012 at 4:07 pm

    It works!!!!!!!!!!!!
    Nice Job Dude!

  70. Prady March 22, 2012 at 9:52 pm

    It worked for me too!!
    The problem started after I installed another eclipse and for that changed the Java_Home path to 1.6 where as the original eclipse used to point to 1.5
    After the machine restarted, the original eclipse used to give the error message(JVM something). I removed the xxpermsize and it started working again.

  71. Ambar March 26, 2012 at 2:32 pm

    Thanks! It worked like a charm. :)

  72. Orange April 7, 2012 at 1:00 am

    Thanks a million ! Helped start the myEclipse 10.

    Have 1 question

    I increased Xms and Xmx values. Do they really apply to all java processes spawned ?

  73. Orange April 7, 2012 at 1:06 am

    Correction, removing that value did not start the myEclipse. I had to restore the original set of values

    -Xmx768m
    -XX:MaxPermSize=256m

  74. Bharath May 4, 2012 at 5:54 pm

    Thank Q So Much….:)

  75. Aravindan May 15, 2012 at 9:14 pm

    Thank you Boss, Really helped me a lot.
    After a lot of struggle, your tips really worked for me

  76. Eddie May 16, 2012 at 1:08 am

    Thanks! Totally worked! But, why? My version was the windows 32 bit indigo jee

  77. Damodar Prasad May 22, 2012 at 7:57 pm

    thanks its save my lots of time.

  78. MobileGuru June 6, 2012 at 10:00 am

    It took only a sec to solve it. Thanks!

  79. sneha June 22, 2012 at 7:19 pm

    Thanks a lot ! This solution worked for me ..

  80. Mathew June 22, 2012 at 10:23 pm

    Thanks a lot!! This worked for me too ..

  81. Pracheta June 27, 2012 at 1:04 pm

    Thanks it worked :)

  82. Aditya June 28, 2012 at 2:45 pm

    thanks dude :) it works

  83. Subhas July 21, 2012 at 6:46 pm

    Narendran’s solution worked !!! Thanks !

  84. Shoebuddin August 6, 2012 at 3:00 pm

    Thanks,

  85. Shoebuddin k IBM August 6, 2012 at 3:02 pm

    can you please tell me why is that included if not required in eclipse.ini file

  86. Djole-97 August 12, 2012 at 3:36 am

    TNX A LOT MAN UR THE BEST !!!

  87. Doug August 18, 2012 at 3:11 am

    This is what worked for me:

    Remove these two lines from the config file:

    -showsplash
    org.eclipse.platform

    The splashscreen needs a Windoze dll (COMCTL32.DLL) to display the splashscreen before the vm starts. If this .dll happens to open in the middle of your memory space, the java vm can’t allocate a large enough contiguous block of RAM for the object heap. By disabling this flag, the vm will start and then display the splashscreen. Problem solved.

    http://www.eclipsezone.com/eclipse/forums/t104307.html

  88. sanat August 21, 2012 at 3:40 pm

    problem solved in just a second.. thank a lot.. great work..

  89. nilesh August 31, 2012 at 1:32 am

    Thanks :) it worked for me as well!!!

  90. Widichamp September 4, 2012 at 8:19 pm

    i want to Edit Spalsh screen plz some body help me!!

  91. Kirill September 18, 2012 at 8:39 am

    Thanks! Saved me!

  92. Sowmya September 18, 2012 at 9:22 pm

    It’s good to know that it worked for u :)
    My eclipse.ini contents are these:
    #This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
    #Mon Sep 17 23:14:57 CEST 2012
    org.eclipse.update.reconcile=false
    eclipse.p2.profile=SDKProfile
    osgi.framework=file\:plugins/org.eclipse.osgi_3.7.2.v20120110-1415.jar
    equinox.use.ds=true
    eclipse.buildId=2.1-M2-20120917-Typesafe
    osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.v20110815-1438.jar@1\:start
    org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
    eclipse.product=org.scala-ide.sdk.product
    osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
    osgi.framework.extensions=reference\:file\:org.eclipse.equinox.weaving.hook_1.0.100.v20110502.jar
    osgi.bundles.defaultStartLevel=4
    eclipse.application=org.eclipse.ui.ide.workbench
    eclipse.p2.data.area=@config.dir/../p2

    I’m not able to solve this problem :( Do u know how to proceed? Thanks in advance.

  93. dbdjbah (@dbdjbah) September 29, 2012 at 12:02 am

    Thanks.. You saved my life

  94. anonym October 4, 2012 at 7:53 pm

    many many thanks ! :)

  95. hello4747 October 31, 2012 at 1:24 am

    Totally worked by removing the 256m part on teh ini file. Thx.

  96. vasu November 22, 2012 at 1:24 pm

    It worked..Saves lots of time!!!!!!!!!!

  97. C.H. November 24, 2012 at 9:30 pm

    A big thank for u! It works for me ,too.

  98. Hollermann November 28, 2012 at 7:07 am

    It did’t work at all! I downloaded the complete package from http://developer.android.com/sdk/index.html, unpacked it, after executing eclipse.exe error appeared “Failed to create the Java Virtual Machine”. Non of any changes of eclipse.ini worked. I installed the latest jdk, nevertheless the error remains.

  99. Hollermann November 28, 2012 at 7:17 am

    Deleting eclipse.ini worked for me (almost).

  100. Amit December 18, 2012 at 1:31 am

    Reblogged this on i-techno and commented:
    saved lots of my time,thanks :)

  101. Marc January 29, 2013 at 12:14 am

    Thanks! How crappy that this is necessary!

  102. Vaibhav February 4, 2013 at 5:12 pm

    Hi there,

    I am Having lots of configuration with eclipse Helios and lots of Plug ins integrated.

    After updating ADT and some other plug ins , it is crashing and denying to work.

    when running eclipsec.exe from cmd it gives me following error

    “Javac {0} or above, which is required to build BlackBerry WebWorks application, is not found in your system.
    Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.i
    de.IDEWorkbenchActivityHelper$4
    Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: net.rim.browser.tools.A.A
    .H”

    Please see if you can help .

    PS : I have tried your solution also but didnt work.

    Thanks
    Vaibhav

  103. Linas February 20, 2013 at 3:10 pm

    Actually your advise diddn’t help.
    But restarting my computer – did :-)

  104. www.qipairensheng.com April 15, 2013 at 4:30 pm

    Companies are competing among themselves to ascertain their charisma on
    the World Wide Web. The websites hosted may be owned by individuals or by large companies
    for promoting their businesses. com site
    to help you reach the most objective and informed decisions.

  105. hosting April 16, 2013 at 4:29 pm

    A web hosting firm that provides a good level of support will have a recent backup of
    your web site restored very quickly, whereas a cheap web host with
    minimal support may rely upon you having made your own backups and the technical expertise to restore your website to its former glory.
    These services include business, personal
    and professional web hosts of their kinds. Many people are creating
    their personal blog and sharing what is inside of their mind.

  106. Satish May 7, 2013 at 7:28 pm

    Thanks…

  107. Yi Xiong June 13, 2013 at 4:10 pm

    Thanks a million!! Worked like magic!!

  108. hard water September 13, 2013 at 10:05 am

    Wonderful article! We will be linking to this particularly great article on
    our site. Keep up the good writing.

  109. girls who lift weights October 19, 2013 at 4:35 am

    Heya i’m for the first time here. I came across this board and I find It truly helpful & it helped me out a lot.
    I am hoping to present something again and help others like you aided me.

  110. Shirleen October 29, 2013 at 8:37 am

    I feel that is one of the most vital information for me.
    And i am happy studying your article. But wanna
    observation on some normal things, The website taste is ideal, the articles is actually great :
    D. Excellent job, cheers

  111. Wordpress Hosting comparison December 10, 2013 at 2:33 am

    You can certainly see your skills within the work you write.

    The world hopes for more passionate writers like
    you who aren’t afraid to say how they believe. At all times follow your heart.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 110 other followers

%d bloggers like this: