I am running a java application that I wrote and I am getting this error:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.
at java.lang.StringBuilder.toString(StringBuilder.jav a:430)
at net.sourceforge.retriever.fetcher.HTTPFetcher.getI nnerURLs(Unknown Source)
at net.sourceforge.retriever.fetcher.Fetcher.fetch(Un known Source)
at net.sourceforge.retriever.URLParser.run(Unknown Source)
at net.sourceforge.retriever.ThreadPool$RunnableHandl er.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Any help is appreciated.
2 years 1 week ago
It means that the JVM has run out of all the memory that has been allocated to it. You can change the amount of memory allocated for use by your JVM using the -Xms and -Xmx command line parameters.
For example, the following says run your myApp in a JVM and allocate a minimum of 5 Megabytes and a maximum of 15 Megabytes off of the heap in order to do so.
java -Xms5m -Xmx15m myApp