2

I have a GUI developed in netbeans. It works fine inside netbeans but while I am running the jar file outside of the IDE it reads half of the folders and does the calculations of only half of the input but not all. I got the following error:

java.lang.OutOfMemoryError: Java heap space error.

Please help me how to solve this problem.

1 Answer 1

1

Try to run your application with next parameters: java -Xmx2048m -Xms256m where Xmx specifies maximum memory can be allocated for heap and Xms is minimum memory allocated on start. In your netbeans configuration this parameters overriden to be bigger than default ones that's why in secondcase you get out of memory exception.

But of course values i provided can be changed and adjusted. Try to find most optimal values for your application and hardware.

Not the answer you're looking for? Browse other questions tagged or ask your own question.