Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running PMD v4.2.5 on Windows 7 and it is running out of memory with the following error:

Exception in thread "Thread-4" java.lang.OutOfMemoryError: Java heap space

How can I configure the JRE to allow the process to consume more memory? I have 4 GB of RAM and would hope that is enough.

share|improve this question
    
I don't know the correct answer, but I heard that 64bit JRE in some cases fixes the problem, so try it out. – AndrejaKo May 9 '11 at 19:59
up vote 7 down vote accepted

Launch 'java' with -Xmx<memory> option. e.g.

java -Xmx512m ...

Use java -help to display options. The -Xmx option is a non-standard option. Use java -X to display a list of non-standard options.

share|improve this answer

If calling from the commandline add -Xmxnnnm to the commandline to set the max to nnn mb. Ex: -Xmx256m to give the heap 256 mb of memory.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .