0

How can I increase JVM heap size in my application executable jar file? The project type is Maven Project.

jewelsea
  • 150,031
  • 14
  • 366
  • 406
Sunil
  • 54
  • 4

1 Answers1

1

You cannot do this within the jar file. Instead, start your Jar-File app.jar with the following parameters:

java -jar -Xms30G -Xmx100G app.jar
  • Xms: initial heap size (here 30 GB)
  • Xmx: maximum heap size (here 100 GB)

Note that this is independent from your project type.

You can also set these parameters within your IDE:

yascho
  • 314
  • 1
  • 6