Details
Description
When setting variables in setenv.bat they don't find their way to JAVA_DEFAULT_OPTS. This is due to the variable overwrite in line 231.
set DEFAULT_JAVA_OPTS=%JAVA_MODE% -Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% -Dderby.system.home="%KARAF_DATA%\derby" -Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass
Instead it should be:
set DEFAULT_JAVA_OPTS=%JAVA_MODE% %DEFAULT_JAVA_OPTS% -Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% -Dderby.system.home="%KARAF_DATA%\derby" -Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass
to keep the previous contents of DEFAULT_JAVA_OPTS.
The same applies for karaf.bat.