1

Im having out of memory errors and generally a very slow eclipse running with window builder and dealing with some big visual classes, so after some research I realized that increasing the heap java size would solve the problem... and it did...

(on eclipse.ini)
-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
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Dhelp.lucene.tokenizer=standard
-Xms120m
-Xmx512m
-XX:MaxPermSize=1024m

now I dont see why getting more heap size would hurt me, so everytime I try to put on

-Xmx1024m

It gives me the 'Failed to Create the Java Virtual Machine'

Why cant I do it and would it help me with the slow processing and rendering of visual classes?

Vitor Hugo
  • 1,106
  • 1
  • 15
  • 35

2 Answers2

1

Check out this related post that gives a lot of solutions for solving your 'Failed to Create the Java Virtual Machine' problem: Eclipse error: 'Failed to create the Java Virtual Machine'

Besides increasing your heap, most of the time, it also helps to increase your PermGen space by using the -XX:MaxPermSize paramater. Setting this to 128m or even 256m might speed things up for you.

Community
  • 1
  • 1
Nihathrael
  • 515
  • 1
  • 4
  • 13
  • Im sorry for not mentioning it but Im also using -XX:MaxPermSize with 1024 – Vitor Hugo Nov 08 '12 at 18:03
  • 1
    @VitorHugo How do you expect people to help you if you only post half of the information? Try to remove one by one the arguments you have added until Eclipse starts. Then try to see why it does not work. Btw, MaxPermSize is written differently from heap size: `-XX:MaxPermSize=256M` (Notice the `=`) – Guillaume Polet Nov 08 '12 at 18:07
  • @VitorHugo Wild guess but are you using a JVM 32-bits or JVM 64 bits? – Guillaume Polet Nov 08 '12 at 18:18
  • You have the entry twice, not sure if that is a problem though. Check this for more detailed explainations of the difference between `--XX:MaxPermSize` and `laucher.XXMaxPermSize`: http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_available_to_Eclipse%3F You might want to try `-XX:MaxPermsize` instead. – Nihathrael Nov 08 '12 at 18:18
  • @VitorHugo Does it work when you reduced the MaxPermSize to 256M? It could be that you are just eating too much memory for a 32-bits JVM (which can probably handle around 3Gb of memory) – Guillaume Polet Nov 08 '12 at 18:24
  • Guillaume, it works exactly how I posted, and if I decrease any of the options it still works, my question was why cant I increase heap size... – Vitor Hugo Nov 08 '12 at 18:26
  • Are you sure you have enough free RAM available? Setting PermGen to 1Gig will reserve one gigabyte of ram directly when starting up the jvm as far as I know. Together with a heap of 1 Gigabyte you'll need quite some ram at your disposal. – Nihathrael Nov 08 '12 at 18:30
  • @VitorHugo My suggestion was that you may have hit some limit when you add all the size you request. So I would have suggested to decrease the PermSize to allow increasing the heap size (I never needed more than 256M for the Perm(Gen)Size anyway). Just a hunch... – Guillaume Polet Nov 08 '12 at 18:57
0

Check out this related post that gives a lot of solutions for solving your 'Failed to Create the Java Virtual Machine' problem: Eclipse Error: Failed To Create the Java Virtual Machine

Aman
  • 51
  • 5