Versions Compared

Key

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

Oracle  announced  that  Java Oracle announced that the Java Applet and WebStart Web Start functionality, including the Applet API, The Java plug-in, the Java Applet Viewer, JNLP and Java Web Start including the javaws toolare tools are all deprecated in JDK 9 and will be removed in a future release. As an alternative, our customers are recommended to use the Nexaweb launcher Launcher to deploy and  run nexaweb Nexaweb web applicationapplications

This step-by-step guide shows how to perform the migration of Nexaweb application to Nexaweb launcher

Prerequisites:

...

.

...

To deploy a Nexaweb application using Nexaweb Launcher, the recommended approach is using Nexaweb Standalone Client, here are the steps:

Info
  1. Nexaweb Launcher is based on an open source project GetDown. For information on GetDown project, please refer to: GetDown
  2. For more information on Nexaweb Launcher, please refer to: Nexaweb Launcher
  3. For more information on Nexaweb Standalone Client, please refer to: Standalone Client

...

Prerequisites:

  1. Nexaweb Platform with version 4.5.66 or higher
  2. Nexaweb Launcher Installer

You can find the installers at the Nexaweb download page

Step-by-step guide

To deploy a Nexaweb application using Nexaweb Launcher, the recommended approach is to use the Nexaweb Standalone Client. Here are the steps:

  1. Create a runNexaweb file for launching Nexaweb web application

    The way to nexaweb create Nexaweb web application is by using a  run.nexaweb ( nexaweb a runNexaweb (Nexaweb Launching Protocol) file deployed on the server, when user type the url . When the user types the URL of a nexaweb Nexaweb file in the browser, the Windows application will detect that the response is nexaweb a Nexaweb file and it will launch start Nexaweb  launcher to load the Web Start application according to the setting in the nexaweb Nexaweb file. So a nexaweb Nexaweb file needs to be created for the Nexaweb application.

    1. Download the latest version nexaweb platform( greater than of Nexaweb Platform (4.5.65.0009 or later) and installed it on the Serverinstall it on the server
    2. Download and install Nexaweb Launcher on the client machine.
    3. Create a new Nexaweb application project with the 4.5.65.0999 or the later version platformcopy NexawebImages
    4. Copy NexawebImages.jar,  NexawebStandaloneClient.jar,  and all other jars to WebContent directory as below:

             Note:  NexawebStandaloneClient.jar are come from Platform .\Nexaweb Platform 4.5.65\bin Note: You can find NexawebStandaloneClient.jar and NexawebImages.jar in the bin directory where Nexaweb Platform is installed

            d. Edit web.xml to add runNexaweb  jsp runNexaweb JSP and  /runNexaweb  url URL mapping as below:

              d1.  At line #62:

...

             d2.  At line #109: #109

             <servlet <servlet-mapping>

              <servlet-name>RunNexaweb</servlet-name>

               <url-pattern>/runNexaweb</url-pattern>

              </servlet-mapping>

    e. Run the project as on a web server and , go to the URL: http://localhost:8080/nxRunNexaweb/runNexaweb  , and save run.nexaweb  runNexaweb

2. Digest the jars and create digest.txt and digest2.txt and upload them to the nexaweb application

           Nexaweb launcher uses Getdown’s digester to generate jar’s digest and use the digest to check if it needs to download a new version jar file or not. So the users need to digest all jars the web application needed and put them in the same directory with GetDown.txt which is just the same file runNexaweb in a different name. After generating the digest files, they need to be added into WebContent directory too as the jars.

    a. Down load digesters jar: getdown. Create a local folder called "target". Copy getdown-1.7.1-SNAPSHOT.jar  from nexaweb download sitejar from Nexaweb Launcher installation folder and paste it into the target folder

    b. Copy the runNexaweb file at step #d2 into this target folder 

    c. Create a digester directory and copy run.nexaweb at the step #d2 into it and change its name "digesters" sub-folder under this target folder, copy runNexaweb file into this folder, and then rename it to getdown.txt (Note: please check if the file extension is .txt after change the name renaming)

    c.  Copy all jars that project needs to run properly into it and the digest directory looks like as below:d. Copy NexawebImages.jar, and NexawebStandaloneClient.jar in the digesters directory

    e. Copy all jars other than above jars into the ClientClassLoader directory, and the digesters directory looks as below:

    

       Image RemovedImage Added

                Note  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 directoryan external jar called test.jar. It is put under ClientClassLoader directory, which is as below. If the project does not need any jars other than NexawebImages.jar and NexawebStandaloneClient.jar, you don't need to create a ClientClassLoader directory.

           d      Image Added

           f. Run the command below in command lines below:

            1  cd    1)  Change the command prompt to D:\target folder

               2). Run command -  java -classpath getdown-1.7.1-SNAPSHOT.jar com.threerings.getdown.tools.Digester digesters

            Note: "D:\target" is the directory where getdown-1.7.1-SNAPSHOT.jar is put in and "digesters" is the directory to be digested in the above command             and it . This command creates two digest files as the screenshot below: 

            Image Added

             Image Removed

          eg.  Copy these two digest files to nexaweb project’ to WebContent directory the Nexaweb project’s WebContent folder as below :

            

            fh. Restart the nexaweb Nexaweb project and all the setting needed for nexaweb 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 Nexaweb web application 

 a. Download NexawebLauncherInstall.exe from nexaweb download siteStart the server which was configured for the Nexaweb project
 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        Double click runNexaweb in the target folder to launch the Nexaweb web application   


Features:

1.Enable Console for debugging 

Prerequisites: the JVM's version must be greater than 1.6 

Steps: 

  1. Open the app directory. It is in  %SystemDrive%%HOMEPATH%/.nexaweb_<Server>_<Port>_<Application>_ .
    Note: the dots(.) in the server and application are replaced with underbar(_) . For example, the app directory: C:\Users\xuchen\.nexaweb\nxwb127_0_0_1_8080_myPrj4_ , where 127_0_0_1_ is the server 127.0.0.1 replaced . with _ , 8080 is port, and myPrj4 is application name 
  2. Create a  file debug.txt on it
  3. Relaunch the nexaweb web application, and the console.log will be created to catch all standard outputs   

2. Custom JVM installation and upgrade

Steps: 

  1. Create a custom JVM jar file with name java_windows.jar. It is just a zip file of the jre with the extension jar. Rename the jre folder to java_vm before you create jar

       Image Added

 2. Change runNexaweb.jsp as the screenshot below shows

Image Added

   3. Follow the same instructions Step-by-step guide→ Digest the jars and create digest.txt and digest2.txt and upload them to the nexaweb application.  The digester's directory's structure looks like below

Image Added


And the final web content directory's structure looks like the screenshot below:

Image Added 

Note: The nexaweb launcher uses digested code of the custom JVM to check if it needs to update the custom JVM from the Web. It means that it does not check the custom JVM version in the web. As of results, whenever there are changes for the custom JVM, it must be re-digested and redployed to the web server with all the digest files generated in order to automatically deploy it to the user's machines.



JDK 9 Release Notes Deprecated APIs, Features, and Options

...