System: Ubuntu 18.04.6 LTS, Intel Core i9-9900K, 128 GB DDR4 RAM
I am supposed to run this line:
./bin/jre/bin/java -cp lib/fcc-deploy-archive.jar de.fiskal.connector.init.UpdateCLIApplication
I get this error message after 9 seconds:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3236) ~[?:1.8.0_275]
I tried to allocate (alot) more memory by using the -XmX
like this:
./bin/jre/bin/java -Xmx64g -cp lib/fcc-deploy-archive.jar de.fiskal.connector.init.UpdateCLIApplication
How can I test if the option can be set at all? What else could be the problem here?
CodePudding user response:
Following is for Eclipse
Right mouse click on
Run As - Run Configuration - Arguments - Vm Arguments, then add this
-Xmx2048m
CodePudding user response:
as stated already here you can use the -Xms
and -Xmx
parameters to allocate more memory to the heap of the JVM, but keep in mind that if your machine doesn't have the amount of RAM that you provided in these parameters it will not work.