Reputation: 10469
I have a java app that loads an enormous data set into memory (don't ask - it's messy). This app runs fine in the IntelliJ debugger but gives OOM (out of memory errors) when I try to run it as a compiled .jar file.
How would I find out the params that IntelliJ is using to run it? Looking at the process list didn't reveal anything promising.
Upvotes: 2
Views: 112
Reputation: 97133
The first line in the Run toolwindow in IntelliJ IDEA shows the exact command line used to run the program, including all VM options.
Upvotes: 3
Reputation: 6780
You can simply do something like this:
java -jar -Xmx2048m myJar.jar
The xmx flag should allow you to add more memory for your jar to work with. You can just up this until it works.
Upvotes: 4