Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » "Failed to create the Java Virtual Machine."..huh?(MacOSx 10.6.7 + Eclipse =Failed to create the Java Virtual Machine HELP!!!!!)
"Failed to create the Java Virtual Machine."..huh? [message #668086] Tue, 03 May 2011 17:08 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: May 2011
Junior Member
Ok..I installed Eclipse and it worked fine..then I downloaded the MacOSx 10.6.7 system update and now when I try to open Eclipse, I get the message:

"Failed to create the Java Virtual Machine"

I've done some research and everyone says that you have to modify the eclipse.ini file but there isn't any one correct modification..I mean, I copy what their eclipse.ini file looks like but then I just start to get all kinds of different error messages.

This is what my eclipse.ini file looks like after the eclipse installation without any modification done to it:


-startup
../../../plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20 101122_1400.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x 86_64_1.1.2.R36x_v20101019_1345
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts

Sooooo what am I supposed to do? I can't believe this company makes a program, and when it has bugs or crashes the only way someone can help is by randomly posting to a forum and just pray someone replies??

Well...PLEASE HELP SOMEBODY!!!! Thanks

-----

Moderator here.
Most of the advice in this thread is bad, misguided. Some of these hacks might work temporarily or on certain machine configurations, but the contents of eclipse.ini are not trivial nor arbitrary.
For the authoritative reference, see this wiki page that explains the contents of the file. Also note the See Also links at the bottom of that page for more details about things like heap size, etc.

DO NOT delete eclipse.ini, EVER. It is also inadvisable to remove the -vm or Xmx options. If you do, you're asking for trouble.

[Updated on: Wed, 07 June 2017 13:57] by Moderator

Report message to a moderator

Re: "Failed to create the Java Virtual Machine."..huh? [message #668506 is a reply to message #668086] Thu, 05 May 2011 21:27 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4425
Registered: July 2009
Senior Member

A most peculiar way of asking for help. You've made certain you're
still able to run Java, as "java", from a terminal's command line?

--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: "Failed to create the Java Virtual Machine."..huh? [message #668508 is a reply to message #668506] Thu, 05 May 2011 22:14 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: May 2011
Junior Member
haha..I was just sooo frustrated but I figured it out. In your Eclipsepedia it provided an example of what the eclipse.ini file looks like when your trying to specify a JVM. So I changed the eclipse.ini file and then I made sure that I had all of the correct documents in that path to match the example. In the end it's really quite simple and I'm glad to know that Eclipse has some employees that will respond to user problems..a little slow but at least you replied and thank you for that.
Re: "Failed to create the Java Virtual Machine."..huh? [message #771235 is a reply to message #668508] Mon, 26 December 2011 18:33 Go to previous messageGo to next message
Guillermo Schwarz is currently offline Guillermo SchwarzFriend
Messages: 1
Registered: December 2011
Junior Member
"In the end it's really quite simple"

Can you post said file or at least point to where it is?

I've been having this problem at least 10 times a day, needing to restart the machine everytime, and since the project is growing it seems Eclipse get affected more often every day.

The symptoms of the problem I'm having is that after a certain amount of time Eclipse says "Failed to create native thread" and it suggests I should restart Eclipse, but when I try to start again, it says it is still running, so I need to reboot the machine.

My settings in the command line:

-vmargs -Xms1024M -Xmx2048M -XX:MaxPermSize=1024M
Re: "Failed to create the Java Virtual Machine."..huh? [message #794406 is a reply to message #668086] Thu, 09 February 2012 08:45 Go to previous messageGo to next message
iga z is currently offline iga zFriend
Messages: 1
Registered: February 2012
Junior Member
Hi,

I had the same problem and found this discussion, and it really didn't help me at all, because "No real name" actually found his own solution and didn't post it here, just communicated his achievement and left.

I solved my problem adding this command line in my eclise.ini file:

-vm C:\Program Files\Java\jre6\bin\javaw


This bug happened because I installed JRE7 and my eclipse.ini didn't specify the JVM used. In this case, I suppose that eclipse looks for the most recent and tries to start with it. (I also tried inserting the command line for the JRE7, but the error still appeared)

In my case, the correct JVM version was 6, but in other cases it may depend on how the eclipse is installed. The real problem here I suppose it was the installation of another version of JVM, that eclipse wasn't configured for.

I hope this helps someone Smile
Re: "Failed to create the Java Virtual Machine."..huh? [message #814449 is a reply to message #794406] Tue, 06 March 2012 13:15 Go to previous messageGo to next message
Sridhar Srv is currently offline Sridhar SrvFriend
Messages: 1
Registered: March 2012
Junior Member
Thanks iga z.
Your post helped me overcome this issue.
Re: "Failed to create the Java Virtual Machine."..huh? [message #826786 is a reply to message #668086] Thu, 22 March 2012 14:00 Go to previous messageGo to next message
Pradeep Bommisetty is currently offline Pradeep BommisettyFriend
Messages: 4
Registered: March 2012
Junior Member
A simple fix for that could be to remove the size after launcher.XXMaxPermSize
I mean change
"--launcher.XXMaxPermSize
256m"
to
"--launcher.XXMaxPermSize"...That worked for me.

You can alternatively 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 might change based on your requirement) in the "Default VM Arguments" text field.

[Updated on: Thu, 22 March 2012 14:03]

Report message to a moderator

Re: "Failed to create the Java Virtual Machine."..huh? [message #902100 is a reply to message #826786] Wed, 15 August 2012 20:39 Go to previous messageGo to next message
Sensei Tebbayo is currently offline Sensei TebbayoFriend
Messages: 1
Registered: August 2012
Junior Member
Thank you so much. Remving the size (512m in my case) worked for me
Re: "Failed to create the Java Virtual Machine."..huh? [message #990386 is a reply to message #826786] Wed, 12 December 2012 09:22 Go to previous messageGo to next message
Yokesvaran Kumarasamy is currently offline Yokesvaran KumarasamyFriend
Messages: 1
Registered: December 2012
Junior Member
I have used java 7, below change done in eclipse.ini


-Dosgi.requiredJavaVersion=1.7
-vm C:\Program Files\Java\jre7\bin\javaw

and removed the 256m from "--launcher.XXMaxPermSize"
its working for me..

thanks,
regards
Yokesvaran.K
Re: "Failed to create the Java Virtual Machine."..huh? [message #992478 is a reply to message #668086] Fri, 21 December 2012 18:49 Go to previous messageGo to next message
Alex Schroeder is currently offline Alex SchroederFriend
Messages: 1
Registered: December 2012
Junior Member
Hey all, thanks for posts containing your experiences and what you have tried out to solve the problem. After I have read all your comments it came to my mind to just
uninstall the fresh installed Java 7 and the Java Development file.
After I did this Eclipse started without any problems until now.
Hope this helped you a bit.
If this helped you please like my new page by searching it on Facebook
"How to Program Apps"
I want to build a community that helps each other to programm and design
beautiful and complex apps.

Alex
Re: "Failed to create the Java Virtual Machine."..huh? [message #993548 is a reply to message #668086] Mon, 24 December 2012 19:25 Go to previous messageGo to next message
Yasir Ali is currently offline Yasir AliFriend
Messages: 1
Registered: December 2012
Junior Member
You can also solve this issue by removing the value "256m" under the line "-launcher.XXMaxPermSize".
Re: "Failed to create the Java Virtual Machine."..huh? [message #997373 is a reply to message #668086] Mon, 07 January 2013 09:03 Go to previous messageGo to next message
Akash Deep is currently offline Akash DeepFriend
Messages: 1
Registered: January 2013
Junior Member
Deleting eclipse.ini worked from me, i think eclipse will require it in future. So there is some issue in it !
Re: "Failed to create the Java Virtual Machine."..huh? [message #1005700 is a reply to message #997373] Mon, 28 January 2013 10:34 Go to previous messageGo to next message
gyan aso is currently offline gyan asoFriend
Messages: 1
Registered: January 2013
Junior Member
I can run by deleting eclipse.ini. I don't know why happen like that. Can anyone explain me why?
Re: "Failed to create the Java Virtual Machine."..huh? [message #1008622 is a reply to message #1005700] Wed, 13 February 2013 10:52 Go to previous messageGo to next message
Yuri Sliznikov is currently offline Yuri SliznikovFriend
Messages: 1
Registered: February 2013
Junior Member
Hi!

I snimply deleted -Xm...m lines and Eclipse was running.

bye!
Re: "Failed to create the Java Virtual Machine."..huh? [message #1082642 is a reply to message #668086] Thu, 08 August 2013 21:39 Go to previous messageGo to next message
sol robby is currently offline sol robbyFriend
Messages: 1
Registered: August 2013
Junior Member
YOUR RIGHT THANKS DUDE Laughing
Re: "Failed to create the Java Virtual Machine."..huh? [message #1145748 is a reply to message #997373] Sat, 19 October 2013 19:13 Go to previous messageGo to next message
Saman Chalian is currently offline Saman ChalianFriend
Messages: 1
Registered: October 2013
Junior Member
Thank you. that's way helped me to run eclipse.
icon14.gif  Re: "Failed to create the Java Virtual Machine."..huh? [message #1161767 is a reply to message #794406] Wed, 30 October 2013 01:24 Go to previous messageGo to next message
Eric Clipse is currently offline Eric ClipseFriend
Messages: 1
Registered: October 2013
Junior Member
Thanks this worked for me as the first two lines in eclipse.ini:

-vm
C:\Program Files\Java\jre7\bin\javaw
Re: "Failed to create the Java Virtual Machine."..huh? [message #1219465 is a reply to message #668086] Wed, 04 December 2013 01:39 Go to previous messageGo to next message
Bruce Qu is currently offline Bruce QuFriend
Messages: 1
Registered: December 2013
Junior Member
The ultimate resolve method:
Eclipse: failed to create the java virtual machine message box
1.Open folder with Eclipse.exe and find eclipse.ini file
2.Replace -vmargs by your current real path of javaw.exe, like:
-vm "c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe"
Re: "Failed to create the Java Virtual Machine."..huh? [message #1227825 is a reply to message #1219465] Sun, 05 January 2014 18:32 Go to previous messageGo to next message
Yogi MR is currently offline Yogi MRFriend
Messages: 1
Registered: January 2014
Junior Member
I used below method and it works fine:


Eclipse: failed to create the java virtual machine message box
1.Open folder with Eclipse.exe and find eclipse.ini file
2.Replace -vmargs by your current real path of javaw.exe, like:
-vm "C:\Program Files\Java\jre7\bin\javaw.exe"

Thanks
Re: "Failed to create the Java Virtual Machine."..huh? [message #1242832 is a reply to message #668086] Mon, 10 February 2014 06:31 Go to previous messageGo to next message
Priyadarshani Gade is currently offline Priyadarshani GadeFriend
Messages: 1
Registered: February 2014
Junior Member
Hey thanx... It worked for me... Very Happy
Re: "Failed to create the Java Virtual Machine."..huh? [message #1285761 is a reply to message #668506] Sun, 06 April 2014 00:19 Go to previous messageGo to next message
Russell Harland is currently offline Russell HarlandFriend
Messages: 1
Registered: April 2014
Junior Member
Actually, the guy has a point. A program should run without this kind of difficulty.
Re: "Failed to create the Java Virtual Machine."..huh? [message #1290832 is a reply to message #1219465] Thu, 10 April 2014 13:25 Go to previous messageGo to next message
Don Tai is currently offline Don TaiFriend
Messages: 1
Registered: April 2014
Junior Member
Bruce Qu wrote on Tue, 03 December 2013 20:39
The ultimate resolve method:
Eclipse: failed to create the java virtual machine message box
1.Open folder with Eclipse.exe and find eclipse.ini file
2.Replace -vmargs by your current real path of javaw.exe, like:
-vm "c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe"


Newby here, and recently downloaded the Android SDK. After the download and install, Eclipse started well. A couple of days later I start Eclipse again and I get the "Failed to create the Java Virtual Machine" error. The above post fixed the problem.

Thanks
Re: "Failed to create the Java Virtual Machine."..huh? [message #1422437 is a reply to message #826786] Fri, 12 September 2014 21:34 Go to previous messageGo to next message
Srinivasan Ramaswami is currently offline Srinivasan RamaswamiFriend
Messages: 1
Registered: September 2014
Junior Member
I found this solution very helpful, removed the 256m from "--launcher.XXMaxPermSize". It works for me.
Thanks a lot. Cool
Re: "Failed to create the Java Virtual Machine."..huh? [message #1448541 is a reply to message #668086] Mon, 20 October 2014 04:31 Go to previous messageGo to next message
Guruprasad Atigire is currently offline Guruprasad AtigireFriend
Messages: 1
Registered: October 2014
Junior Member
Permissible way to resolve this issue is, either you restart your java tree or change the --launcher.XXMaxPermSize
256m to 128m
Re: "Failed to create the Java Virtual Machine."..huh? [message #1692826 is a reply to message #668086] Mon, 20 April 2015 04:14 Go to previous messageGo to next message
Mohammad Shareef Baba is currently offline Mohammad Shareef BabaFriend
Messages: 1
Registered: April 2015
Junior Member
Deleting all the content from the eclipse.ini has worked for me. Though it's strange, it has profited.
Re: "Failed to create the Java Virtual Machine."..huh? [message #1692925 is a reply to message #1692826] Mon, 20 April 2015 15:37 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Moderator here.
Most of the advice in this thread is bad, misguided. Some of these hacks might work temporarily or on certain machine configurations, but the contents of eclipse.ini are not trivial nor arbitrary.
For the authoritative reference, see this wiki page that explains the contents of the file. Also note the See Also links at the bottom of that page for more details about things like heap size, etc.

DO NOT delete eclipse.ini, EVER. It is also inadvisable to remove the -vm or Xmx options. If you do, you're asking for trouble.

Finally, please DO NOT post to this thread with a "thank you" or "works for me" messages; I'll lock the thread if we get too many of those.
Re: "Failed to create the Java Virtual Machine."..huh? [message #1717502 is a reply to message #1692925] Mon, 14 December 2015 12:11 Go to previous message
balmydrizzle blamydrizzle is currently offline balmydrizzle blamydrizzleFriend
Messages: 1
Registered: December 2015
Junior Member
I download Eclipse Mars Windows version and have this problem. I edit eclipse.ini and convert EOL to CRLF then save. Problem fixed.
Previous Topic:Any way to safely step through plugin code that results in popup menus?
Next Topic:automatically change perspective when switching between different editors
Goto Forum:
  


Current Time: Tue Mar 19 13:59:21 GMT 2024

Powered by FUDForum. Page generated in 0.03445 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top