From 6965d85f654482a8253d2699ddbf6bd768a160c4 Mon Sep 17 00:00:00 2001 From: Serge Rider Date: Fri, 27 Oct 2023 11:14:56 +0200 Subject: [PATCH] dbeaver/pro#2008 Patch server start scripts --- deploy/scripts/run-server.bat | 36 ++++++++++++++++++++++++++++++++++- deploy/scripts/run-server.sh | 35 ++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/deploy/scripts/run-server.bat b/deploy/scripts/run-server.bat index 82d3ba3565..7a1f726d43 100644 --- a/deploy/scripts/run-server.bat +++ b/deploy/scripts/run-server.bat @@ -10,4 +10,38 @@ IF NOT EXIST workspace\.metadata ( ) ) -java %JAVA_OPTS% -Dfile.encoding=UTF-8 --add-modules=ALL-SYSTEM --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -jar %launcherJar% -product io.cloudbeaver.product.ce.product -web-config conf/cloudbeaver.conf -nl en -registryMultiLanguage +SET VMARGS_OPTS = "" +If Not Defined JAVA_OPTS ( + SET VMARGS_OPTS = "-Xmx2048M" +) + +java %JAVA_OPTS% ^ + -Dfile.encoding=UTF-8 ^ + --add-modules=ALL-SYSTEM ^ + --add-opens=java.base/java.io=ALL-UNNAMED ^ + --add-opens=java.base/java.lang=ALL-UNNAMED ^ + --add-opens=java.base/java.lang.reflect=ALL-UNNAMED ^ + --add-opens=java.base/java.net=ALL-UNNAMED ^ + --add-opens=java.base/java.nio=ALL-UNNAMED ^ + --add-opens=java.base/java.nio.charset=ALL-UNNAMED ^ + --add-opens=java.base/java.text=ALL-UNNAMED ^ + --add-opens=java.base/java.time=ALL-UNNAMED ^ + --add-opens=java.base/java.util=ALL-UNNAMED ^ + --add-opens=java.base/java.util.concurrent=ALL-UNNAMED ^ + --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED ^ + --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED ^ + --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED ^ + --add-opens=java.base/sun.nio.ch=ALL-UNNAMED ^ + --add-opens=java.base/sun.security.ssl=ALL-UNNAMED ^ + --add-opens=java.base/sun.security.action=ALL-UNNAMED ^ + --add-opens=java.base/sun.security.util=ALL-UNNAMED ^ + --add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED ^ + --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED ^ + --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED ^ + --add-opens=java.sql/java.sql=ALL-UNNAMED ^ + -jar %launcherJar% ^ + -product io.cloudbeaver.product.ce.product ^ + -data %workspacePath% ^ + -web-config conf/cloudbeaver.conf ^ + -nl en ^ + -registryMultiLanguage diff --git a/deploy/scripts/run-server.sh b/deploy/scripts/run-server.sh index b826ef55a6..c0308fb005 100755 --- a/deploy/scripts/run-server.sh +++ b/deploy/scripts/run-server.sh @@ -4,6 +4,37 @@ launcherJar=( server/plugins/org.eclipse.equinox.launcher*.jar ) echo "Starting Cloudbeaver Server" -[ ! -d "workspace/.metadata" ] && mkdir -p workspace/.metadata && mkdir -p workspace/GlobalConfiguration/.dbeaver && [ ! -f "workspace/GlobalConfiguration/.dbeaver/data-sources.json" ] && cp conf/initial-data-sources.conf workspace/GlobalConfiguration/.dbeaver/data-sources.json +[ ! -d "workspace/.metadata" ] && mkdir -p workspace/.metadata \ + && mkdir -p workspace/GlobalConfiguration/.dbeaver \ + && [ ! -f "workspace/GlobalConfiguration/.dbeaver/data-sources.json" ] \ + && cp conf/initial-data-sources.conf workspace/GlobalConfiguration/.dbeaver/data-sources.json -java ${JAVA_OPTS} -Dfile.encoding=UTF-8 --add-modules=ALL-SYSTEM --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -jar ${launcherJar} -product io.cloudbeaver.product.ce.product -web-config conf/cloudbeaver.conf -nl en -registryMultiLanguage +java ${JAVA_OPTS} \ + -Dfile.encoding=UTF-8 \ + --add-modules=ALL-SYSTEM \ + --add-opens=java.base/java.io=ALL-UNNAMED \ + --add-opens=java.base/java.lang=ALL-UNNAMED \ + --add-opens=java.base/java.lang.reflect=ALL-UNNAMED \ + --add-opens=java.base/java.net=ALL-UNNAMED \ + --add-opens=java.base/java.nio=ALL-UNNAMED \ + --add-opens=java.base/java.nio.charset=ALL-UNNAMED \ + --add-opens=java.base/java.text=ALL-UNNAMED \ + --add-opens=java.base/java.time=ALL-UNNAMED \ + --add-opens=java.base/java.util=ALL-UNNAMED \ + --add-opens=java.base/java.util.concurrent=ALL-UNNAMED \ + --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \ + --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED \ + --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED \ + --add-opens=java.base/sun.nio.ch=ALL-UNNAMED \ + --add-opens=java.base/sun.security.ssl=ALL-UNNAMED \ + --add-opens=java.base/sun.security.action=ALL-UNNAMED \ + --add-opens=java.base/sun.security.util=ALL-UNNAMED \ + --add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED \ + --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED \ + --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \ + --add-opens=java.sql/java.sql=ALL-UNNAMED \ + -jar ${launcherJar} \ + -product io.cloudbeaver.product.ce.product \ + -web-config conf/cloudbeaver.conf \ + -nl en \ + -registryMultiLanguage