I'm running inside a VM. In the VMWare settings, I can see that the RAM alloted is 6016 MB which is 6GB. As recommended in our company I used -Xmx1024m (the default was 512) but eclipse fails to start, saying jvm exit code -1. The maximum开发者_StackOverflow中文版 value for Xmx that works is 660m. Why is this happening? Please help before I shoot myself.
Edit: I'm able to run a Helloworld java program specifying the option -Xmx1024m. Only eclipse cribs during starting.
You need to make sure that your OS and JVM are both 64-bit. In a 32-bit environment virtual memory address space fragmentation can result in relatively small contiguous memory blocks being available.
If you have to stay with 32-bit OS, then try adding the following to the start of your eclipse.ini file:
-vm
[some.path]/javaw.exe
You may also want to try disabling any devices that aren't strictly required as that will load fewer drivers into the address space and cause less fragmentation.
Try running with parameters -Xms1024M -Xmx6016M
Here Xms is the initial heap memory at startup and xmx is total heap memory that can be allocated. You can increase or decrease heap memory depending on your project and objects size.
Can you please try with -Xmx1024m and -Xms512m. Somtimes if the difference between maximum and minimum heap space size is too large it affects eclipse startup.
Ok Now, Remove all the Windows java files from the System32 directory and install the latest jdk from sun. Then start the Eclipse, it will run I hope.
After removing it may ask for the latest jdk/jre. So set the path to include jre in JDK. And run it.
Using the Android bundle version - adt-bundle-windows-x86-20130219
I had the same issue with the virtual machine failing to start. I reduced the mem max (running in a VM as well xp x86). I found this thread and modified the config and it worked for me. The VM ram was 1.7gb, upped to 2.1 with no change.
I changed the eclipse.ini setting from
-Xmx768m
to
-Xmx512m
and it started straight away.
I left the min at 40m and the other settings were unchanged.
Heres the full config:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-Declipse.buildId=v21.1.0-569685
精彩评论