Java 17 installation
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Java 17 installation

From OpenSpecimen version 10.1 onwards, you need to install and use Java 17.

For Linux and Ubuntu

  1. Install Java 17 using the below command.

Ubuntu

sudo apt install openjdk-17-jdk openjdk-17-jre

RedHat

sudo dnf install java-17-openjdk-devel java-17-openjdk

  1. Change the existing JAVA_HOME directory path in .bashrc file and point to the Java 17 directory.

  1. Check the Java version using the below command.

              # java -version

  1. Edit the $Tomcat_Dir/bin/setenv.sh file and remove the below lines.

             "-XX:PermSize=64m -XX:MaxPermSize=512m"

  1. Add the below-mentioned Java specific startup parameters required by Tomcat in $Tomcat_Dir/bin/catalina.sh file.

             JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.net=ALL-UNNAMED

  1. Deploy the OpenSpecimen build.

 

For Windows

  1. Rename the existing Java folder under C drive C:\Program Files\Java to C:\Program Files\Java_bkp

  2. Uninstall the old java from the control Panel

  3. Download and install the Java 17 from here.

  4. Change the Java environment variables and insert the new path to the JDK folder.

  5. Check the Java version using below command once the installation is complete.
                 # java -version

  6. Edit the service.bat file inside $Tomcat_Home/bin/service.bat location.

  7. Find the following string "--JvmOptions9" in the service.bat file and add the below line.
                --add-opens=java.base/java.lang=ALL-UNNAMED#

  8. Edit the catalina.sh file, which can be found under $Tomcat_Home/bin/catalina.bat directory.

  9. Add the below parameter under the "JDK_JAVA_OPTIONS" options.
                JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.net=ALL-UNNAMED"

  10. Deploy the OpenSpecimen build.

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com