You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rz...@apache.org on 2022/01/05 15:40:13 UTC

[tomee] branch master updated: TOMEE-3823 - Adjust JVM Options in Windows Service Install script to be compatible with Java 17. The option '-XX:MaxPermSize' was removed in Java 17.

This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d40d6c  TOMEE-3823 - Adjust JVM Options in Windows Service Install script to be compatible with Java 17. The option '-XX:MaxPermSize' was removed in Java 17.
3d40d6c is described below

commit 3d40d6c32fa1784c71633152a2f4a3eedae60fa8
Author: Richard Zowalla <rz...@apache.org>
AuthorDate: Wed Jan 5 16:40:02 2022 +0100

    TOMEE-3823 - Adjust JVM Options in Windows Service Install script to be compatible with Java 17. The option '-XX:MaxPermSize' was removed in Java 17.
---
 tomee/apache-tomee/src/main/resources/service.bat | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tomee/apache-tomee/src/main/resources/service.bat b/tomee/apache-tomee/src/main/resources/service.bat
index c94ff29..d7cbd82 100644
--- a/tomee/apache-tomee/src/main/resources/service.bat
+++ b/tomee/apache-tomee/src/main/resources/service.bat
@@ -255,8 +255,13 @@ set PR_STDERROR=auto
 rem before this option was added: "++JvmOptions=-Djava.library.path="%CATALINA_BASE%\bin" ^"
 rem the drawback was it was preventing custom native lib to be loaded even if added to Path
 "%EXECUTABLE%" //US//%SERVICE_NAME% ^
-	++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;-Djava.awt.headless=true;-XX:+UseParallelGC;-XX:MaxPermSize=256M"
+	++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;-Djava.awt.headless=true;-XX:+UseParallelGC"
 
+rem the JVM option "-XX:MaxPermSize=256M" was removed in Java 17+
+if %JAVA_MAJOR_VERSION% lss 17 (
+    "%EXECUTABLE%" //US//%SERVICE_NAME% ^
+    	++JvmOptions "-XX:MaxPermSize=256M"
+)
 echo The service '%SERVICE_NAME%' has been installed.
 
 :end