Upgrading RestAPI server to Oracle Java Development Kit (JDK) 17
search cancel

Upgrading RestAPI server to Oracle Java Development Kit (JDK) 17

book

Article ID: 277268

calendar_today

Updated On:

Products

CA 7 Workload Automation

Issue/Introduction

Is it possible to upgrade the Java Development Kit (JDK) Standard from 16 to 17 for the RestApi?

Resolution

Here are the steps to upgrade JDK, as we don't support these steps but it works.

1. Stop REST_API services
2. Download the new JDK 17
3. Untar the JDK into a directory of your choice
4. Rename the old jre to something else 
5. Cope the new JDK 17 that was just untared into the install dir /opt/broadcom/7RestServices
6. Rename the copied JDK dir to jre
7. Go to /opt/broadcom/7RestServices/apache-tomcat-9.0.71/bin
8. Edit setenv.sh and copy and paste the following lines:  
 
BASE="$(dirname "$CATALINA_HOME")"
echo "Parent dir: $BASE"
export JRE_HOME=$BASE/jre
export JAVA_OPTS="$JAVA_OPTS -Xms128m -Xmx1024m -server --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED"
export CATALINA_PID=/$CATALINA_HOME/bin/pid.txt
echo "JAVA_OPTS:$JAVA_OPTS"
 
Note: the highlighted lines should be all on one line and not wrapped or else the swagger page will not load.
 
9. Re-start the services