APPX Desktop Client Launched via Java Web Start

This document will explain how to start the APPX Desktop Client via Java Web Start Technology.

Overview

When you publish the APPX Desktop Client using Java Web Start technology you ensure the most current version of the application will be deployed, as well as the correct version of the Java Runtime Environment (JRE). Since the APPX Desktop Client will only be configured on the web server, you will not need to install the client on each desktop in your enterprise, just have the user base run the application for a published URL. This document applies to APPX Desktop Client version 4.2.a and above. These instructions do not require any APPX server configuration other than an APPX Login Manager configured to accept logins. APPX server on any platform may be connected to via the client when launched with Java Web Start. The size of the APPX Java Web Start bundle is about 1.3 MB. When the APPX Desktop Client is run for the first time, Java Web Start will download the entire package ; the next time it will check only for modified jar files (an upgrade) and download them. If this is not the case, the application will start immediately.

Required software components

APPX Desktop Client Java Web Start Bundle

You can get the APPX Desktop Client Java Web Start Bundle from here.

APPX Server

You need a functioning APPX installation. Follow instructions in this document to install APPX on Windows if you don't already have APPX installed.

Web Server

You need a functioning web server configured with jnlp mime type support. Apache and IIS are two common servers.

Quick steps

APPX Desktop Client Java Web Start Bundle

  • Unbundle the APPX Desktop Client Java Web Start Bundle files into a directory off of your web server's web root.
  • Configure the .html file to link to the .jnlp file.
  • Edit the .jnlp file and modify any href tags to fit your web server.

APPX Server

Install APPX Server. No special configuration is needed in the APPX Server for APPX Desktop Client connectivity when launched via Java Web Start, just make sure you have an APPX Client Manager (Unix or Linux or Windows) listening and accepting logins.

Detailed steps

Here are the steps I used to load the APPX Desktop Client via Java Web Start. These instructions assume that you already have a working installation of APPX Server that is configured with a Client Manager (Unix or Linux or Windows) and accepting logins. You must also have a web server installed and started.

Download and place the APPX Desktop Client Java Web Start Bundle.

I downloaded version 4.2.a from here. Place the bundle in a directory off of your web server's web root and follow the steps below to install and configure.

  • I am going to use the command line tool wget to fetch the file bundle:

[joe@webserver /]$ cd /var/www/html 
[joe@webserver /]$ sudo wget http://www.appx.com/ftp/appx/products/appx/client/4.2.a/java_web.tgz
[joe@webserver html]$ 

  • Now let's untar the files

[joe@webserver html]$ sudo tar xzvpf appx.tgz

appx/
appx/appx32.gif
appx/appx.html
appx/splash.gif
appx/appx-nativelib.jar
appx/appx.jar
appx/appx.jnlp

[joe@webserver html]$ ls -la

total 1216
drwxr-xr-x  3 root root    4096 Mar  4 14:27 .
drwxr-xr-x 10 root root    4096 Jun 26  2007 ..
drwxrwxrwx  2 root root    4096 Mar  3 14:40 appx
-rw-r--r--  1 root root 1212317 Mar  4 14:27 appx.tgz

[joe@webserver html]$ cd appx
[joe@webserver appx]$ ls

appx32.gif  appx.html  appx.jar  appx.jnlp  appx-nativelib.jar  splash.gif

  • Take a look at the appx.html file. This file is just a starter file that you can use to load the .jnlp file.:

[joe@webserver appx]$ cat appx.html

<HTML>
   <HEAD>
      <TITLE>APPX Desktop Client Web Start</TITLE>
      <body link="#333333" vlink="#444444" alink="#106D86"> 
   </HEAD>
   <BODY BGCOLOR=#146C86>
      <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
      <font color=white>
      <center>
      <body bgimage=appx.jpg>
      <br><br><br>
      <hr>
      <font veranda>
      <font style=bold>
      <font size=13pt>
      <font color=white>
APPX Desktop Client Demonstration
      <hr>
      <br><br>
      <h3>
      <A HREF="http://www.example.com/appx/appx.jnlp">Click</a> To Launch the APPX Desktop Client Demonstration<BR>
   </BODY>
</HTML>

[joe@webserver appx]$ 

  • Now take a look at the appx.jnlp file. This file is an XML file that contains the information needed by Java Web Start to load the APPX Desktop Client jar file:

[joe@webserver appx]$ cat appx.jnlp
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for APPX Desktop Client 4.2.a Application -->
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for APPX Desktop Client 4.2.a Application -->
<!-- example JNLP file that will launch the APPX Desktop Client -->

<!-- where the jnlp file lives on the web -->
<jnlp spec="1.5+" codebase="http://www.example.com/appx" href="appx.jnlp" version ="4.2.a">
   <information>
      <title>APPX Desktop Client 4.2.a Java Web Start Demo Application</title>
      <vendor>APPX Software, Inc.</vendor>
      <homepage href="http://www.appx.com"/>
      <description>APPX Desktop Client version 4.2.a.</description>
      <description kind="short">Connects to APPX Client Login Manager.</description>
      <!-- hover help for this app.  -->
      <description kind="tooltip">APPX Desktop Client 4.2.a</description>
      <!-- This is the APPX Desktop Client application icon and splash screen. -->
      <!-- relative to codebase -->
      <icon href="appx32.gif" width="64" height="64" kind="default" />
      <icon href="splash.gif" kind="splash" />
      <!-- allow app to run without Internet access -->
      <offline-allowed />
   </information>
   
   <!-- The APPX Desktop Client requires the all-permissions value for the security element -->
   <security>
      <all-permissions />
   </security>

   <resources>
      <!-- Acceptable JVMs in preferred order, best first -->
      <!-- Sun JVM -->
      <j2se version="1.6.0" href="http://java.sun.com/products/autodl/j2se" />
      <!-- application code, load before launch. JNLP 1.6 main="true" indicates jar with main class -->
      <jar href="appx.jar" main="true" download="eager" />
   </resources>

   <!-- JNI native Sun .so code -->
   <resources os="SunOS" arch="sparc">
     <!-- relative to codebase -->
     <nativelib href="appx-nativelib.jar" />
   </resources>

   <!-- JNI native Windows .dll code -->
   <resources os="Windows">
      <!-- relative to codebase -->
      <nativelib href="appx-nativelib.jar" />
   </resources>

   <!-- JNI native Linux .so code -->
   <resources os="Linux">
      <!-- relative to codebase -->
      <nativelib href="appx-nativelib.jar" />
   </resources>
   
   <!-- JNI native Mac OS X 64bit .so code -->
   <resources os="Mac\ OS\ X" arch="x86_64">
      <!-- relative to codebase -->
      <nativelib href="appx-nativelib.jar"/>
   </resources>

   <!-- JNI native Mac OS X 32bit .so code -->
   <resources os="Mac\ OS\ X" arch="x86">
      <!-- relative to codebase -->
      <nativelib href="appx-nativelib.jar"/>
   </resources>

   <!-- JNI native Mac OS X ppc .so code -->
   <resources os="Mac\ OS\ X" arch="ppc">
      <!-- relative to codebase -->
      <nativelib href="appx-nativelib.jar"/>
   </resources>

   <!-- application class with main method -->
   <application-desc main-class="start.Appx"> 
      <!-- command line arguments -->
      <argument>-windowTitle=APPX - $(host):$(port)</argument>
      <argument>-remotePort=8064</argument>
      <argument>-remoteUser=prospect</argument>
      <argument>-remoteHost=demo.appx.com</argument>
      <argument>-remotePassword=prospect</argument>
   </application-desc>
</jnlp>


[joe@webserver appx]$ 

APPX Desktop Client Web Start Bundle Components

appx32.gif

The appx32.gif file is the file used as an application runtime icon. It is referenced by the appx.jnlp file that we review later in this document.

appx.jar

The APPX Desktop Client in Java jar format.

appx.jpg

appx-nativelib.jar

The appx-nativelib.jar file contains platform specific files for the proper execution of the appx.jar file.

appx.html

The appx.html file exists only to provide someone with a link to click the appx.jnlp file. It is not technically needed because if someone entered the path to the jnlp file the application would launch just the same as if the jnlp file had been clicked from a link in the html file.

appx.jnlp

This is an XML file that defines the environment that the APPX Desktop Client will run it. The file is made up of elements, element values, element stanzas and comments. The file is documented with comments. Let's review a few of the key elements of the appx.jnlp file.
  • The Codebase is the location of the appx.jar file.
  • The Information section contains the data displayed to the user when the application starts, such as a splash screen image, application icon, and title bar text.
  • The Security element grants the APPX Desktop Client required permissions to run properly on the user's desktop.
  • The Resource element defines a minimum operating environment for the APPX Desktop Client. Here we've specified a JRE version of 1.6 and we can also load optional files based on the client's operating system and hardware platform.

splash.gif

This is the initial image displayed while the APPX Desktop Client is loading, it is referenced by name in the appx.jnlp file.

appx.html

The appx.html file is the web document that a web browser can view. This document contains a link to a Java Web Start file (appx.jnlp). When this link is clicked, the JRE environment is installed if it doesn't exist on the client desktop, and then the APPX Desktop Client application will load. Subsequent clicks will only download updates. Modify

Configure your web server

Your webserver needs to support the .jnlp mime type. There are too many web servers and web server version that each configure via different actions, syntax or configuration file location that it is beyond the scope of this document to cover mime type configuration fully. However, this might be enough to get you on the right track is your server is not already configured for jnlp mime type support.

Apache web server

Microsoft IIS web server

APPX-Desktop-Client-Java-Web-Start-002.gif

Apache /etc/ files.

APPX-Desktop-Client-Java-Web-Start-003.gif

IIS .jnlp mime entry.

That's all there is to publishing APPX Desktop Client utilizing Java Web Start technology.

Bugs:

  1. Fixed - Bug Description 1.
  2. OPEN - Bug test - Test bug. Not valid.

Comments:

Read what other users have said about this page or add your own comments.
-- JoeOrtagus - 04 Mar 2009
Edit | Attach | Watch | Print version | History: r73 | r13 < r12 < r11 < r10 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r11 - 2009-03-06 - JoeOrtagus
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback