Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download OpenJDK 8 from AdaptOpenJDK
    URL: [https://adoptopenjdk.net/releases.html?variant=openjdk8&jvmVariant=hotspot]
  2. Extract the package onto your local hard drive. If you are replacing a JRE that is in the common\jre of the Uniface installation, extract it into the common directory, next to jre. Otherwise, choose a different location. The extraction results in a new directory called something like jdk8u202-b08-jre (the numbers could be different).
  3. Stop the Uniface Tomcat web server and any (Uniface) process that might be using the JRE that you are about to replace.
  4. If you are replacing common\jre, the most straightforward course of action is to rename directory jre to jreOLD, and rename directory jdk8u202-b08-jre to jre. Skip steps 5 to 7 and continue with step 8.
  5. Find jvm.dll in the extracted OpenJDK directory structure. It should be in bin\server. Make a note of this path, fully qualified. You need it in steps 6 and 7.
  6. In the usys.asn (or any other assignment file in which it is set), replace the path to the jvm.dll. For example, replace 
    C:\Program Files\Uniface\common\jre\bin\server\jvm.dll(JNI_CreateJavaVM)
    with the path you made a note of in step 5:
     C:\Program Files\Uniface\common\ jdk8u202-b08-jre\bin\server\jvm.dll(JNI_CreateJavaVM) 
    Do not remove the \jvm.dll(JNI_CreateJavaVM) part.
  7. In the file service.bat in common\tomcat\bin replace the path to JRE at line 5, for example, replace:
    set JRE_HOME=C:\Program Files\Uniface\common\jre
    with 
    set JRE_HOME=C:\Program Files\Uniface\common\jdk8u202-b08-jre
    Do not specify the subdirectory and DLL.
  8. Remove old Tomcat logs in common\tomcat\logs.
  9. Start the Uniface Tomcat web server.
  10. After 20 seconds, look at the logs in common\tomcat\logs.
    There should be a log file that has stderr in its name. Open it with a text editor. It should contain only INFO lines, no exceptions or ERROR lines. Three of those INFO lines are of note:

    Java Home specifies the path to the JRE that Tomcat is using. This location should be the path where you extracted the OpenJDK 8 package;
    JVM Version specifies the JVM version. The version should be equal to the one downloaded from the AdoptOpenJDK site;
    JVM Vendor specifies Oracle Corporation

  11. If you are using XSLT transformations in your application (USYSXSLT), test this part of your application now.
  12. If you are using Uniface's Java-callin functionality and have replaced the JRE in common\jre, test this part of your application now.
    If you are using Uniface's Java-callin functionality but have extracted OpenJDK 8 to some other location, you need to update your scripts, Java programs and Java environment settings so that your Java programs use the new OpenJDK 8.
  13. If you are satisfied that Uniface, Tomcat, and your Java programs are now using OpenJDK 8 and that all works as expected, you can go ahead and remove the old Oracle JRE 1.8 installation.
  14. If you renamed the jre directory under common to jreOLD in step 4, remove this directory and its contents.
    Note: We recommend old JRE installations are removed so that there is no confusion later as to which JRE is being used.
  15. Repeat all of this for any other Uniface installation you may have on any machine.

J.