diff --git a/jadx-cli/build.gradle b/jadx-cli/build.gradle index 089d80dcf..88fddf5a6 100644 --- a/jadx-cli/build.gradle +++ b/jadx-cli/build.gradle @@ -17,7 +17,7 @@ dependencies { application { applicationName = 'jadx' mainClass.set('jadx.cli.JadxCLI') - applicationDefaultJvmArgs = ['-Xms128M', '-Xmx4g', '-XX:+UseG1GC'] + applicationDefaultJvmArgs = ['-Xms128M', '-XX:MaxRAMPercentage=70.0', '-XX:+UseG1GC'] } applicationDistribution.with { diff --git a/jadx-gui/build.gradle b/jadx-gui/build.gradle index 0454f0b74..518cd2de6 100644 --- a/jadx-gui/build.gradle +++ b/jadx-gui/build.gradle @@ -34,6 +34,9 @@ dependencies { application { applicationName = 'jadx-gui' mainClass.set('jadx.gui.JadxGUI') + // The option -XX:+UseG1GC is only relevant for Java 8. Starting with Java 9 G1GC is already the default GC + applicationDefaultJvmArgs = ['-Xms128M', '-XX:MaxRAMPercentage=70.0', '-XX:+UseG1GC', + '-Dawt.useSystemAAFontSettings=lcd', '-Dswing.aatext=true'] } applicationDistribution.with { @@ -62,8 +65,6 @@ shadowJar { } startScripts { - // The option -XX:+UseG1GC is only relevant for Java 8. Starting with Java 9 G1GC is already the default GC - defaultJvmOpts = ['-Xms128M', '-Xmx4g', '-Dawt.useSystemAAFontSettings=lcd', '-Dswing.aatext=true', '-XX:+UseG1GC'] doLast { def str = windowsScript.text str = str.replaceAll('java.exe', 'javaw.exe')