Using Nexaweb Launcher with java 11 and higher

In Java 11, JRE is no longer offered. Only the JDK is offered.
To run nexaweb application with nexaweb launcher, one can still use jdk 11 but the file size will be large. Users can use jlink to create smaller custom runtimes. You can find more details on jlink here.

Using jlink to create custom runtime

  1. Find the list of modules that application uses using jdeps command
    Nexaweb Launcher use 2 jars -
    i. getdown-launcher-1.8.6.jar to start the launcher and download files necessary to start the application.
    ii. NexawebStandaloneClient.jar to start the application.
    So at the minimum, the custom runtime should include modules to run these two jar files.

 

Find the dependencies of getdown-launcher-1.8.6.jar

jdeps getdown-launcher-1.8.6.jar getdown-launcher-1.8.6.jar -> java.base getdown-launcher-1.8.6.jar -> java.desktop getdown-launcher-1.8.6.jar -> java.logging getdown-launcher-1.8.6.jar -> java.scripting

 

Find the dependencies of NexawebStandaloneClient.jar

jdeps NexawebStandaloneClient.jar Warning: split package: javax.swing jrt:/java.desktop C:\Users\nilam\Documents\target\digesters1\NexawebStandaloneClient.jar NexawebStandaloneClient.jar -> java.base NexawebStandaloneClient.jar -> java.datatransfer NexawebStandaloneClient.jar -> java.desktop

So we need at the least modules java.base,java.datatransfer,java.desktop,java.logging,java.scripting.

 

2. Create custom runtime use jlink command

jlink -v --add-modules java.base,java.datatransfer,java.desktop,java.logging,java.scripting --output java_vm

This will link given modules and creates runtime image in the directory java-vm

 

3. Add custom jvm/bin directory to your path environment variable.

 

You can also create a jar from this custom runtime to add as a custom jvm in your application.

Please refer "2. Custom JVM installation and upgrade" in this document for more detail.