I can't run my process. It gives the following exception: "Exception in thread "main" java.lang.OutOfMemoryError: Java heap space"
java -Xms32m -Xmx516m FilteringSNP_genus Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:515) at java.lang.StringBuffer.append(StringBuffer.java:306) at java.io.BufferedReader.readLine(BufferedReader.java:345) at java.io.BufferedReader.readLine(BufferedReader.java:362) at FilteringSNP_genus.main(FilteringSNP_genus.java:65)
I have tried different memory usage configurations like:
java -Xms32m -Xmx1024m FilteringSNP_genus
but it has not worked, and increasing the -XmxVALUE has given a GC overheadlimit exceeded exception:
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.String.substring(String.java:1940) at java.util.StringTokenizer.nextToken(StringTokenizer.java:335) at FilteringSNP_genus.main(FilteringSNP_genus.java:77)
Could anyone provide some clue to fix this?
Thanks