0

I have a zip file generated from dist in IntelliJ. After unzipping it, I have the following file tree:

D:.
├───bin
│       foo
│       foo.bat
│
└───lib
        a.jar
        b.jar
        com.foo.jar
        ...
        x.jar

In Windows, I'm able to run the foo.bat to execute the program. But it seems to have some memory leak, causing following exception after running for ~12 hours:

Uncaught error from thread [dr-akka-ven-akka.actor.default-dispatcher-5142] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[dr-akka-ven]
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:3332)
        at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
        at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:622)
        at java.lang.StringBuilder.append(StringBuilder.java:202)
        ......

Question: how do I know the JVM options being used (like -Xms64m and -Xmx128m), so that I can increase the memory to workaround the issue for now?

XoXo
  • 1,560
  • 1
  • 16
  • 35
  • related: http://stackoverflow.com/q/1441373/3380951 – XoXo Oct 03 '16 at 18:00
  • i've tried `echo %JAVA_OPTS%` per [this answer](http://stackoverflow.com/a/18871694/3380951), but it simply returns `%JAVA_OPTS%` – XoXo Oct 03 '16 at 18:07
  • What's in `foo.bat`? – Seth Tisue Oct 03 '16 at 22:50
  • @SethTisue here's the line which makes the call: `"%_JAVACMD%" !_JAVA_OPTS! !DR_AKKA_VEN_OPTS! -cp "%APP_CLASSPATH%" %MAIN_CLASS% !_APP_ARGS!`. I have skimmed the `bat` file, but could not figure out what values of `_JAVA_OPTS` are being used. I haven't have a Windows environment variable of that name. – XoXo Oct 04 '16 at 12:09
  • modify the batch file to print it? maybe it's empty and you're just getting JVM defaults? – Seth Tisue Oct 04 '16 at 18:00

0 Answers0