Java – heap space issues outside the NetBeans IDE
Editor: I finally made a combination of two suggested answers, so I answered my own question, which is accepted below. I hope it will help others in the future!
I run 32-bit Java 1.8 on Windows 7 0_ forty
I created a program in NetBeans 8.0 and adjusted the VM option to - xms512m - xmx2048m
The program works well in the NetBeans ide environment, but when trying to run the program outside NetBeans, I encountered an out of heap memory error
Editor: I created it for the project when compiling through NetBeans Jar file to start the program
I've gone to the Java control panel and applied the same "- xms512m - xmx2048m" information to the runtime parameters I still encounter an out of heap memory error
Any suggestions? Where can I leave? Did I miss the step of making sure there is enough memory in the runtime environment outside NetBeans?
Solution
The VM option you use in NetBeans can also be used on the command line, i.e
java -Xms512m -Xmx2048m -jar yourprg.jar
More JVM options are available