1

I have a 32bit version of Ubuntu server with PAE active allow for the full use of the 8gb of RAM but I can't use more than 2gb of RAM in Java. I run the command

java -Xms6G -Xmx7G -jar server.jar

and I get the error:

Invalid initial heap size: -Xms6G
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.

do I need to change something with Java? The server is 32bit so PAE is active to allow for the server to use all the 8gb of RAM.

1
  • PAE only means the kernel can use more than 4GB. Each process is still limited to 32-bit address, hence can only address 2/3/...GB depending on how much address is reserved for kernel space
    – phuclv
    Apr 1, 2016 at 9:49

1 Answer 1

2

The fact that you have a PAE kernel doesn't really matter here, a 32 bit JVM suffer this limit, you can try to adopt a 64 bit memory model on a JVM by invoking

java -d64

but this will probably fail if you have a 32 bit only JVM. So get yourself a 64 bit JVM if you want to solve this.

3
  • To get a 64bit JVM, though, you'll need a full 64bit OS, which would require a reinstallation of Ubuntu.
    – Thomas Ward
    Dec 25, 2012 at 15:46
  • @LordofTime it's also possible to install 2 kernels/OS in the same partition, but it's not an easy thing to manage and also I would not do that on a server. 64 bit OSs are the must if you want to setup a server this days ... Dec 26, 2012 at 1:29
  • Eeeyup. Why else would I say you'd need a full 64bit OS? :P
    – Thomas Ward
    Dec 26, 2012 at 1:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .