CB-1140 Pass memry settings only if JAVA_OPTS is not set

This commit is contained in:
Serge Rider
2021-09-30 16:31:25 +03:00
parent f7968ac57a
commit 332bb35325
2 changed files with 10 additions and 3 deletions
+7 -2
View File
@@ -1,4 +1,4 @@
@rem echo off
@echo off
for /f %%a in ('dir /B /S server\plugins\org.eclipse.equinox.launcher*.jar') do SET launcherJar="%%a"
echo "Starting Cloudbeaver Server"
@@ -8,4 +8,9 @@ IF NOT EXIST workspace\.metadata (
copy conf\initial-data-sources.conf workspace\GlobalConfiguration\.dbeaver\data-sources.json
)
java -jar %launcherJar% -product io.cloudbeaver.product.ce.product -web-config conf/cloudbeaver.conf -nl en -registryMultiLanguage -vmargs -Xmx2048M
SET VMARGS_OPTS = ""
If Not Defined JAVA_OPTS (
SET VMARGS_OPTS = "-Xmx2048M"
)
java -jar %launcherJar% -product io.cloudbeaver.product.ce.product -web-config conf/cloudbeaver.conf -nl en -registryMultiLanguage -vmargs %VMARGS_OPTS%
+3 -1
View File
@@ -6,4 +6,6 @@ echo "Starting Cloudbeaver Server"
[ ! -d "workspace/.metadata" ] && mkdir -p workspace/GlobalConfiguration/.dbeaver && cp conf/initial-data-sources.conf workspace/GlobalConfiguration/.dbeaver/data-sources.json
java -jar ${launcherJar} -product io.cloudbeaver.product.ce.product -web-config conf/cloudbeaver.conf -nl en -registryMultiLanguage -vmargs -Xmx2048M
VMARGS_OPTS="${JAVA_OPTS:--Xmx2048M}"
java -jar ${launcherJar} -product io.cloudbeaver.product.ce.product -web-config conf/cloudbeaver.conf -nl en -registryMultiLanguage -vmargs ${VMARGS_OPTS}