0

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

jewelsea
  • 141,332
  • 12
  • 351
  • 391
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
  • 174
  • 6