When you are using JVM in 32-bit mode, the maximum heap size that can be allocated is 1280 MB. So, if you want to go beyond that, you need to invoke JVM in 64-mode.
You can use following:
$ java -d64 -Xms512m -Xmx4g HelloWorld
where,
- -d64: Will enable 64-bit JVM
- -Xms512m: Will set initial heap size as 512 MB
- -Xmx4g: Will set maximum heap size as 4 GB
You can tune in -Xms and -Xmx as per you requirements (YMMV)
参考weblogic jvm设置官方博文:
JVM Tuning: Heapsize, Stacksize and Garbage Collection Fundamental