This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
I have an application that is run through Netbeans that will crash after about 4 hours if I don't manually allocate memory through Properties>Run>VM Options. I move it between different computers and every time I do I create a new project. Sometimes I forget to set the memory and this causes me a huge headache.
Is there a way that I can either 1) Set the minimum and maximum memory through the code itself or 2) Access what the maximum heap size is through the code itself so I could check at startup?