downthecrop / Jad-Practice

Download hosting for my Jad Practice Tool
https://downthecrop.xyz/blog/osrs-jad-simulator-practice-tool/
5 stars 0 forks source link

java.lang.OutOfMemoryError #6

Closed cfdeangelis closed 2 years ago

cfdeangelis commented 2 years ago

I'm on Win11 and getting the error below, at the bottom. I've tried using java -Xmx1024m to change heap size from the default 64 mb, but that doesn't seem to do anything. My computer has 16 GB of RAM and java -Xmx2048m result in:

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

Any advice?

[8/16/22 7:25 PM]: Jad Practice has successfully started up in 33186 milliseconds.
Exception in thread "Thread-7" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Keep-Alive-Timer" java.lang.OutOfMemoryError: Java heap space
        at sun.security.ssl.Alert.<clinit>(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.deliverClosedNotify(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.closeNotify(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.duplexCloseOutput(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.close(Unknown Source)
        at sun.net.www.http.HttpClient.closeServer(Unknown Source)
        at sun.net.www.http.KeepAliveCache.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
cfdeangelis commented 2 years ago

Was able to fix with help here: https://stackoverflow.com/a/30090271 For some reason, could not adjust the heap size using -Xmx512m or other similar commands, but this worked.