On Ubuntu
java -XshowSettings:vm throws:
VM settings: Max. Heap Size (Estimated): 1.00G Using VM: OpenJDK Server VM
I tried editing /etc/profile as in another post to no avail
java -version throws:
openjdk version "11.0.7" 2020-04-14 OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04) OpenJDK Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)
The command I am trying to run is:
java -Xmx4G -Xms4G -jar server.jar nogui
Which throws:
Invalid maximum heap size: -Xmx4G The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
Cannot for the life of me figure out how to fix this. I installed 64-bit java but whatever is already on here takes priority it seems and if I remove is then /usr/bin/java has a fit.