As part of my configuring Zowe, and using Java shared classes, I’ve needed to change the Java parameters in Zowe. I know there is a plan to provide this support – but this is what I’ve done.
Find the start up script.
If you use the Unix command
find zowe/components -name startup.sh
This will list the scripts for the components.
I edited zowe/components/gateway/bin/start.sh and inserted at the top
COL="/u/tmp/zowec/"
TAG="GW"
fn="${COL}/java.options.${TAG}"
if [ -f "${fn}" ]; then
set -x
export
exec 1>>${COL}start.log1${TAG} 2>>${COL}start.log2${TAG}
COLIN="-Xoptionsfile=${fn} -XshowSettings "
else
COLIN=""
fi
and at the bottom of the file
-Dloader.path=${GATEWAY_LOADER_PATH} \
${COLIN} \
-jar ${JAR_FILE} &
This code
- checks for a file java.options.GW in the Zowe instance directory.
- If this file exists
- Create log files in the directory
- Create an override variable (COLIN), specifying the file name, and telling Java to print out the settings.
- If it doesn’t exist, set the variable (COLIN) to blank
- When the Java command is issued, substitute the variable COLIN – which is either blank, or the options file and display Java options command.
Create the java options file.
You can use
touch java.options.GW
or edit the the and add content.
The output
It produced output like
VM settings:
Min. Heap Size: 32.00M
Max. Heap Size: 512.00M
Using VM: IBM J9 VM
Property settings:
XcompilationThreads3 =
Xhealthcenter =
Xjit:count = 0
...
JRE 21 z/OS s390x-64-Bit Compressed References 20241024_16 (JIT enabled, AOT enabled)
OpenJ9 - f45de8e9eb0
OMR - 55ddfd47ab0
IBM - 3c87141
JCL - df334d2be4a based on jdk-21.0.4+7
java.home = /Z31B/usr/lpp/java/J21.0_64
java.io.tmpdir = /tmp
....
xcom.ibm.java.diagnostics.healthcenter.headless.output.directory = /u/tmp/zowec
Locale settings:
default locale = English (United States)
default display locale = English (United States)
...
Security settings summary:
See "java -X" for verbose security settings options
Security provider static configuration: (in order of preference)
Provider name: OpenJCEPlus
Provider name: IBMZSecurity
Provider name: SUN
Provider name: SunRsaSign
...
May 29, 2025 9:30:25 AM sun.security.ssl.SSLLogger log
WARNING: No AlgorithmParameters for sect163k1
May 29, 2025 9:30:27 AM sun.security.ssl.SSLLogger log
WARNING: No AlgorithmParameters for sect163r1
...
Security TLS configuration (SunJSSE provider):
Enabled Protocols:
TLSv1.3
TLSv1.2
2 thoughts on “Zowe: Specifying Java overrides”