Skip to content

Commit ecf8464

Browse files
sslavicphilwebb
authored andcommitted
Replace MaxPermSize use in build scripts
Since JDK 8 is required to build Spring framework 4, and permanent generation is gone from Java 8, to eliminate warnings about no longer available MaxPermSize switch, it should be removed or replaced with new MaxMetaspaceSize switch. This fix replaces old with new switch to limit the amount of native memory used for class metadata. Issue: SPR-10571
1 parent 4d33832 commit ecf8464

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ configure(rootProject) {
961961
gradleVersion = "1.6"
962962

963963
doLast() {
964-
def gradleOpts = "-XX:MaxPermSize=1024m -Xmx1024m"
964+
def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
965965
def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
966966
File wrapperFile = file("gradlew")
967967
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
##############################################################################
88

99
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
GRADLE_OPTS="-XX:MaxPermSize=1024m -Xmx1024m $GRADLE_OPTS"
10+
GRADLE_OPTS="-XX:MaxMetaspaceSize=1024m -Xmx1024m $GRADLE_OPTS"
1111
DEFAULT_JVM_OPTS=""
1212

1313
APP_NAME="Gradle"

gradlew.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
if "%OS%"=="Windows_NT" setlocal
1010

1111
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12-
set GRADLE_OPTS=-XX:MaxPermSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%
12+
set GRADLE_OPTS=-XX:MaxMetaspaceSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%
1313
set DEFAULT_JVM_OPTS=
1414

1515
set DIRNAME=%~dp0

0 commit comments

Comments
 (0)