views:

178

answers:

1

HI,

I have the following configuration: Server : windows 2003 server (32 bit) java version: 1.5_0_22

I get the following error when executing from command line ( my code is based off eclipse wihch gives the same error)

java -XX:MaxPermSize=256m -Xmx512m Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.

The server has over 20GB physical memory with over 19 GB free right now.

It does not give an error upto -Xmx486m

I have read other articles about contiguous memory space. There is hardly anything running on this server. Can I validae this in any way?

Thanks

A: 

If your memory is fragmented, the JVM will not be able to obtain the continous memory it needs. Try running java after a fresh reboot and you should be able to get a 1 GB or more.

With a 64-bit OS and JVM you won't have this problem.

For comparison have you tried Java 6? Even if you cannot use Java 6 this would help indicate whether the problem is more likely to be in the OS (if Java 6 doesn't works either) or in Java 5.0 is (if Java 6 works)

As Java 5.0 is no longer freely supported, if you need support for Java 5.0 you will have to pay for it.

Peter Lawrey