////////////////////////////////////////////////////////////////////////////////////// // Setting memory for JUnit tests in NetBeans 6 // // Bryan Smith, January 5 2009 ////////////////////////////////////////////////////////////////////////////////////// Here's a quick and dirty way to set the memory for JUnit tests for a certain project: 1. In the project directory, open up nbproject/build-impl.xml for editing 2. Find the tag, and inside the ... tags, put: 3. To verify that this worked, add a method to any existing test to print memory available: public void testMemoryUsage() throws Exception { Runtime r = Runtime.getRuntime(); System.out.println("DEBUG> Free memory:"+Long.toString(r.freeMemory())); System.out.println("DEBUG> Total memory:"+Long.toString(r.totalMemory())); } The comments in build-impl.xml state that the file is generated and that should edit build.xml instead. However, with little documentation and NullPointerException's thrown whenever the override statement is incorrect, it seems wise to settle on a solution. Let me know if you find a better method. As of now, the NetBeans GUI does not offer a way to edit these values, though I have seen an email on the NetBeans JUnit mail list expressing this need, which can be found at: http://markmail.org/message/i37vszsdmoqgvt7h