0

My Eclipse (or, more specific, Spring Tool Suite) version is:

Version: 3.6.3.RELEASE
Build Id: 201411281415
Platform: Eclipse Luna SR1 (4.4.1)

It worked fine, until recently, when I started getting the following error after opening Eclipse:

Error: Could not create the Java Virtual Machine
Error: A fatal exception occured. Program will exit.

My start options include -vm <path to javaw> -vmargs -Xmx1024m -XX:MaxPermSize=256m, I am using jdk1.7.0_79, the 32 bit version, on a 64bit Windows.

I discovered, when setting -Xmx to 768m, Eclipse will start most of the time. I also noticed that starting eclipse began to fail when I installed the MySQL service; if I deactivate it, the Task Manager shows me I have roughly 4gb of 16gb of RAM consumed; with MySQL running, that value increases to 5gb.

What is the reason, when there are 5gb consumed and roughly 11gb of RAM left, that no JDK can be created, and is there a known workaround?

Alex
  • 1,175
  • 1
  • 8
  • 25

2 Answers2

2

It is likely because of lack of virtual address space. Remember that 32-bit processes have only 2GB of virtual space, which is needed for:

  • application code
  • DLLs, both application DLLs and shared DLLs like hooks
  • java off-heap needs: code caches, buffers, etc.
  • java heap itself

So, physical RAM is unrelated.

What likely happened?

Eclipse grew heavier so JVM needs more off-heap to function

What you can do?

Uninstall unneeded plugins, shut down your antivirus or other software that could intervene with Eclipse, use 64bit java. 64bit apps are faster on modern processors + 64-bit java uses compressedOps so it could make sense.

Sergey Alaev
  • 3,851
  • 2
  • 20
  • 35
  • Removing a few plugins did instead do the trick, thank you! I'll consider switching to a 64bit JDK, though. – Alex Oct 08 '15 at 10:48
0

In the past i had simlar issues, but no solution. I reached the limit with -Xmx1500m.

See also Maximum Java heap size of a 32-bit JVM on a 64-bit OS.

Is using the 64 bit Version of the JDK no option?

Community
  • 1
  • 1
AlexN
  • 1,613
  • 8
  • 21
  • I considered this, but in my department, all developers should use the same JVM and Eclipse version, so I would not be the only person affected. I hoped there would be a workaround which would allow me to continue to use my current system. – Alex Oct 08 '15 at 08:52