Oracle announced that Java Applet and WebStart functionality, including the Applet API, The Java plug-in, the Java Applet Viewer,JNLP and Java Web Start including the javaws toolare all deprecated in JDK 9 and will be removed in a future release. As an alternative , customers are recommended to use Nexaweb launcher to deploy and run nexaweb web application.
This step-by-step guide shows how to perform the migration of Nexaweb application to Nexaweb launcher
Step-by-step guide
To deploy a Nexaweb application using Java Web Start, the recommended approach is using Nexaweb Standalone Client, here are the steps:
For more information on Nexaweb Standalone Client, please refer to: Standalone Client
- Create run.nexaweb file for launching nexaweb web application.
The way to nexaweb web application is by using a run.nexaweb ( nexaweb Launching Protocol) file deployed on the server, when user type the url of a nexaweb file in the browser, the Windows will detect that the response is nexaweb file and it will launch Nexaweb launcher to load the Web Start application according to the setting in the nexaweb file. So a nexaweb file needs to be created for the Nexaweb application.
- Download the latest version nexaweb platform( greater than 4.5.65.0009) and installed it on the Server
- Create a new Nexaweb application project with the 4.5.65.0999 or the later version platform
- copy NexawebImages.jar, NexawebStandaloneClient.jar, and all other jars to WEB-INF directory as below:
Note: NexawebStandaloneClient.jar are come from Platform .\Nexaweb Platform 4.5.65\bin
d. Edit web.xml to add runNexaweb jsp and /runNexaweb url mapping as below:
d1. At line #62:
<servlet>
<servlet-name>RunNexaweb</servlet-name>
<display-name>RunNexaweb</display-name>
<description/>
<servlet-class>
com.nexaweb.server.jnlp.replacement.RunNexawebServlet
</servlet-class>
</servlet>
d2. At line: #109
<servlet-mapping>
<servlet-name>RunNexaweb</servlet-name>
<url-pattern>/runNexaweb</url-pattern>
</servlet-mapping>
e. Run the project as web server and go to the URL: http://localhost:8080/nxRunNexaweb/runNexaweb , save run.nexaweb
2. Digest the jars and create digest.txt and digest2.txt and upload them to the nexaweb application
a. Check out digester jar from the SVN: https://svn.nexaweb.com/svn/NXGETDOWN/trunk/getDown/target/getdown-1.7.1-SNAPSHOT.jar
b. Create a digester directory and copy run.nexaweb at the step #d2 into it and change its name to getdown.txt (Note: please check if the file extension is .txt after change the name )
c. Copy all jars that project needs to run properly into it and the digest directory looks like as below:
Note: the demo project uses only the standard jars. For the project that uses some other jars, it needs copy all its jars to this directory
d. Run the command below in command line:
java -classpath getdown-1.7.1-SNAPSHOT.jar com.threerings.getdown.tools.Digester digesters
and it creates two digest files as the screenshot below:
e. Copy these two digest files to nexaweb project’ to WebContent directory as below :
f. Restart the nexaweb project and all the setting needed for nexaweb launcher are done .
Note: whenever the jar files are changed, they need to be re-digested
3. Install the nexaweb launcher on the client machine and Launch the nexaweb web application
a. Check out the installer from the SVN: https://svn.nexaweb.com/svn/NXGETDOWN/trunk/installer/install.exe
b. Install the nexaweb launcher to the client machine
c. open the URL http://localhost:8080/nxRunNexaweb/runNexaweb , and save it as run.nexaweb
d. Double click run.nexweb to launch nexaweb web application
Related articles
JDK 9 Release Notes Deprecated APIs, Features, and Options