user1197471
user1197471

Reputation: 21

It is failed to create Java Virtual Machine

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.

Upvotes: 2

Views: 2894

Answers (1)

Peter Lawrey
Peter Lawrey

Reputation: 533442

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.

Upvotes: 3

Related Questions