Hi,
I create a simple Java file which prints something on the system.out, compile and run it with the following,
public class MyClass {
public static void main(String[] args) {
System.out.println("MyClass here");
}
}
java -Xmx1024m MyClass
and I get
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
I have 4GB memory and I have no idea at all why this would not work. Doing java -Xmx512m MyClass
works, but I want to know why 1GB will be denied.