2

I got "failed to create JVM" error when I tried to run a jnlp file.

But it works when I removed the max-heap-size="1100m" from Java/j2se tag in jnlp.

It seems something wrong with the max-heap-size. I did some experiments to change the heap size in eclipse.ini file. The biggest heap size I could set is "940M", otherwise I got "Could not create JVM..." error when start the eclipse.

I suspect this is a memory(hardware) problem on my PC. My laptop is pretty new. But for some reason, my admin change the OS from Windows 7 to Windows XP. They now want to change back to windows 7.

I am using JDK 1.6 update 29 and eclipse Version: 3.7.0 Build id: I20110613-1736. Windows xp sp3.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
user1197471
  • 21
  • 1
  • 2
  • 1
    possible duplicate of [Java webstart max-heap-size causes JVM cannot be started](http://stackoverflow.com/questions/3285915/java-webstart-max-heap-size-causes-jvm-cannot-be-started) – NPE Feb 08 '12 at 15:12
  • Also, see http://stackoverflow.com/questions/171205/java-maximum-memory-on-windows-xp – NPE Feb 08 '12 at 15:12
  • I can tell you it's not a memory/hardware problem because it happens on ALL Eclipses on any Windows I've seen so far... – m0skit0 Feb 08 '12 at 15:12
  • I would guess a simple search on SO would give you a lot of info. [Maximum memory Windows XP](http://stackoverflow.com/questions/171205/java-maximum-memory-on-windows-xp) for example – Peter Svensson Feb 08 '12 at 15:13

1 Answers1

3

Java requires continuous memory for the heap space. Windows in particular tends to have a limited continuous region of memory available (which is smaller if other programs are running)

I would have thought you can have 1.2 GB heap, but this is far less than the 4 GB a 32-bit application can use in theory.

Switching to a 64-bit JVM on a 64-bit OS is the solution. This will allow you to create a heap space close to the physical memory size.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130