Reputation: 2694
From yesterday I receive the message: "Failed to create the java virtual machine" in all Java applications in my Windows machine. Maybe I had a virus or something similar. The only advice I found on other sites is to set the heap size to a lower value. The problem is that I have big applications running that requires at least 1024M heap size. Also my machine has 4GB Ram so I think that it isn't a too low memory problem.
Upvotes: 2
Views: 12989
Reputation: 1
First I had tried to make changes in eclipse.ini
file as there was told here, but that did not help.
I simply deleted this .ini
file, it helped and Eclipse launched.
Upvotes: 0
Reputation: 5302
Changing the before file into:
"-vm C:\Program Files\Java\jdk1.7.0_03\bin\javaw.exe"
solves the problem mentioned earlier
Upvotes: 0
Reputation: 1045
It is because Eclipse cannot find the path of javaw.exe
Just edit "eclipse.ini" file, adding this path:
Open the file and attach following sentences (replacing with your own path if different): -vm C:\Program Files\Java\jdk1.7.0_03\bin\javaw.exe
Sample:
-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
256m
--launcher.defaultAction
openFile
-vm C:\Program Files\Java\jdk1.7.0_03\bin\javaw.exe
-vmargs
-Xms40m
-Xmx384m
Upvotes: 0
Reputation: 11
Same problem even i was facing when i first started eclipse.. Just change the value of "–launcher.XXMaxPermSize" in eclipse.ini file..
The eclipse.ini file should now look like this:
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
–launcher.defaultAction
openFile
–launcher.XXMaxPermSize
–showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
–launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
Upvotes: 1
Reputation: 18468
Sun JVM needs contigous memory block. In windows this could a problem due to dll-rebasing. http://www.drdobbs.com/184416272;jsessionid=HJJRNPUURRDIZQE1GHPCKHWATMY32JVN
Is there any thing else changed?
We got similar problem we installed some new applications(guess it was Citrix) on it. A tool we used was from here http://www.codeproject.com/KB/DLL/RebaseDLLs.aspx (download the code and modify)
If it is left to you, then consider moving to 64bit jvm.
Upvotes: 1
Reputation: 719641
Carefully move the current JDK / JRE installation to one side, and install a fresh copy. If it works, you are done. If not, you have eliminated the possibility that this is a corrupted installation.
Another possibility is that this is really a path problem. Can you run java -version
from a command prompt? Can you compile and run a Java "hello world" program from the command line?
Yes, in theory it could have had a virus ... or someone could have tinkered with the installation.
Upvotes: 4
Reputation: 1387
There are a few sites listing that error that differentiate between the heap and perm space. If you're running this through eclipse, try removing the default perm space value in the eclipse.ini: --launcher.XXMaxPermSize 256m
Upvotes: 1