2

I am working with a Java program (reading large files) on Eclipse - Windows. After running my program I get the error:

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

I see on http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom that I should add the option -XX:-UseGCOverheadLimit to the command line.

Where should I add this option? How can I solve this?

3

1 Answer 1

0

In your Tomcat bin folder you will find a file Catalina.sh which has a variable called CATALINA_OPTS. You need set it with -XX:-UseGCOverheadLimit.

Though I am not very learned in this subject, AFAIK this is a temporary solution. You make check this answer. It might help.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but I cannot find the file 'Catalina.sh'? Where can I find this file?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.