From 6f113ebd087a7175cc733d650286c4bea8aeefc1 Mon Sep 17 00:00:00 2001 From: Tony Germano Date: Wed, 23 Apr 2025 22:48:17 -0400 Subject: [PATCH 1/2] move and rename java 9+ vmoptions file Signed-off-by: Tony Germano --- .../mcservice-java9+.vmoptions => conf/default_modules.vmoptions} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename server/{docs/mcservice-java9+.vmoptions => conf/default_modules.vmoptions} (100%) diff --git a/server/docs/mcservice-java9+.vmoptions b/server/conf/default_modules.vmoptions similarity index 100% rename from server/docs/mcservice-java9+.vmoptions rename to server/conf/default_modules.vmoptions From 47e75ee3293137a501f188d84aa1bdcaec759099 Mon Sep 17 00:00:00 2001 From: Tony Germano Date: Thu, 24 Apr 2025 00:30:48 -0400 Subject: [PATCH 2/2] Add tiered vmoptions to local build engine.vmoptions in the basedir now only has includes for the following three files: /conf/base_includes.vmoptions contains the default options for all runs as of mirth 4.5.2. /conf/default_modules.vmoptions contains the java 9+ options as of 4.5.2. /conf/custom.vmoptions is empty other than usage instructions and is the target for user changes Signed-off-by: Tony Germano --- server/basedir-includes/engine.vmoptions | 10 ++++++++++ server/build.properties | 3 ++- server/build.xml | 5 +++++ server/conf/base_includes.vmoptions | 8 ++++++++ server/conf/custom.vmoptions | 22 ++++++++++++++++++++++ server/conf/default_modules.vmoptions | 6 +++++- 6 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 server/basedir-includes/engine.vmoptions create mode 100644 server/conf/base_includes.vmoptions create mode 100644 server/conf/custom.vmoptions diff --git a/server/basedir-includes/engine.vmoptions b/server/basedir-includes/engine.vmoptions new file mode 100644 index 0000000000..b2e974b3e1 --- /dev/null +++ b/server/basedir-includes/engine.vmoptions @@ -0,0 +1,10 @@ +# Lines begining with a # are ignored as comments. +# Do not add customizations to this file. + +-include-options conf/base_includes.vmoptions + +# Comment out the following line if you are running on Java 8 +-include-options conf/default_modules.vmoptions + +# Put any custom options in the following file +-include-options conf/custom.vmoptions diff --git a/server/build.properties b/server/build.properties index 6485da39ee..00c2e82760 100644 --- a/server/build.properties +++ b/server/build.properties @@ -19,6 +19,7 @@ docs.javadocs=${docs}/javadocs docs.javadocs.userapi=${docs.javadocs}/user-api installer=${basedir}/installer installer.lib=${installer}/lib +basedir_includes=${basedir}/basedir-includes # jars client-core.jar=mirth-client-core.jar @@ -47,4 +48,4 @@ setup.docs=${setup}/docs # dist directory dist=${basedir}/dist dist.extensions=${dist}/extensions -test.dist=${basedir}/testdist \ No newline at end of file +test.dist=${basedir}/testdist diff --git a/server/build.xml b/server/build.xml index 839952a185..96830a4ece 100644 --- a/server/build.xml +++ b/server/build.xml @@ -1002,6 +1002,11 @@ + + + + + diff --git a/server/conf/base_includes.vmoptions b/server/conf/base_includes.vmoptions new file mode 100644 index 0000000000..ecfd6d87fa --- /dev/null +++ b/server/conf/base_includes.vmoptions @@ -0,0 +1,8 @@ +# +# Do not modify this file! It may get overwritten in an update. Please put all custom +# options in custom.vmoptions +# +-server +-Xmx256m +-Djava.awt.headless=true +-Dapple.awt.UIElement=true diff --git a/server/conf/custom.vmoptions b/server/conf/custom.vmoptions new file mode 100644 index 0000000000..1acaf2e42e --- /dev/null +++ b/server/conf/custom.vmoptions @@ -0,0 +1,22 @@ +# Add any custom vmoptions to this file. Special directives are: +# +# -include-options +# : include options from another .vmoptions file. Applied recursively. +# +# -classpath +# : replace the classpath built so far with +# +# -classpath/p +# : prepend to classpath. +# +# -classpath/a +# : append to classpath. +# +# -java-cmd +# : use the java binary specified to launch the engine. +# +# Additionally, the form ${ENV_VAR} can be used anywhere in the file to substitute the value +# from an environment variable. +# +# Any lines which do not match the special directives above will be passed through directly as +# arguments to the java binary. diff --git a/server/conf/default_modules.vmoptions b/server/conf/default_modules.vmoptions index 811391868d..3b7f32e2dc 100644 --- a/server/conf/default_modules.vmoptions +++ b/server/conf/default_modules.vmoptions @@ -1,3 +1,7 @@ +# +# Do not modify this file! It may get overwritten in an update. Please put all custom +# options in custom.vmoptions +# --add-modules=java.sql.rowset --add-exports=java.base/com.sun.crypto.provider=ALL-UNNAMED --add-exports=java.base/sun.security.provider=ALL-UNNAMED @@ -15,4 +19,4 @@ --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED ---add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED \ No newline at end of file +--add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED