I just installed Ubuntu 64Bit on my VServer and JRE build 1.7.0_67-b01. If I want to run a java jar-file it says
Invalid maximum heap size: -Xmx Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
java -help says
java version “1.7.0_67” Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
I tried 1M, 256M, 1024M, 2G and 4G for -Xmx, nothing works. Is there a hidden setting I don’t know?
Here’s the command I use:
java -Xmx 1024M -Xms 1024M -jar MyConverter.jar
Advertisement
Answer
Remove the space after Xmx and Xms