Permalink
Browse files

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
  • Loading branch information...
sslavic authored and Phillip Webb committed May 18, 2013
1 parent 4d33832 commit ecf8464d2fc5233d4a75de5a99cd871d07c82de1
Showing with 3 additions and 3 deletions.
  1. +1 −1 build.gradle
  2. +1 −1 gradlew
  3. +1 −1 gradlew.bat
View
@@ -961,7 +961,7 @@ configure(rootProject) {
gradleVersion = "1.6"
doLast() {
- def gradleOpts = "-XX:MaxPermSize=1024m -Xmx1024m"
+ def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
File wrapperFile = file("gradlew")
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
View
@@ -7,7 +7,7 @@
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-GRADLE_OPTS="-XX:MaxPermSize=1024m -Xmx1024m $GRADLE_OPTS"
+GRADLE_OPTS="-XX:MaxMetaspaceSize=1024m -Xmx1024m $GRADLE_OPTS"
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
View
@@ -9,7 +9,7 @@
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set GRADLE_OPTS=-XX:MaxPermSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%
+set GRADLE_OPTS=-XX:MaxMetaspaceSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0

0 comments on commit ecf8464

Please sign in to comment.