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. This document applies to APPX Desktop Client version 5.2.2 and higher.

These instructions do not require any APPX server configuration other than an APPX Login Manager configured to accept logins. The size of the APPX Java Web Start bundle is about 18 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.

The first time a user connects to the URL, an icon will be added to their desktop. Subsequent connections can be made by just clicking the icon on the desktop.

Required software components

APPX Desktop Client Java Web Start Bundle

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

Web Server

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

Quick steps

  • Make sure your Web Server can process .jnlp files
  • Unbundle the APPX Desktop Client Java Web Start Bundle files into a directory in your web server's web root.
  • Edit the .jnlp file and modify the codebase URL and any href tags to suit your APPX installation.

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.

For a Windows Web Server, download the Java Web Start Bundle and place the bundle in a directory off of your web server's web root. Extract the files using the appropriate command (tar or zip).

index.html

The index.html file is a starter file that loads the .jnlp file. There is a bit of javascript code that attempts to detect if a JRE is installed on the user's desktop for the Java Web Start launch. If the JRE needs to be installed or updated the script will either attempt to update the JRE or present the user with the appropriate link to download the software manually. You can customize this file as desired. Alternatively, some browsers will open the .jnlp file directly.

appx.jnlp

This is an XML file that defines the environment for the APPX Desktop Client. The file is made up of elements, element values, element stanzas and comments. The file is documented with comments. The only change required is the URL of the appx.jnlp file. For example, if we installed the web start bundle in the 'appx' folder of our 'www.abc-company.com' web site, then we would change the 'codebase' line to:

codebase="http://www.abc-company.com/appx/"

You may also want to customize the "<menu submenu="APPX via JWS">" line. This decription is used for the desktop icon that is automatically created, you can change this to something more meaningful for your installation.

At the bottom of the appx.jnlp file, notice the application-desc elements with argument attributes of -windowTitle, -remoteHost, etc. You can add any APPX Desktop Client startup parameter to this section. To see the allowed parameter names, look under 'File->Preferences' after you have logged on. Any changes you make will be used the next time anyone logs in.

Table of possible element / attribute available in a JNLP file.

Element

Attributes

Description

Since

Required

jnlp

This is the main xml element for a jnlp file. Everything is contained within the jnlp element.

1.0

yes

spec

The spec attribute can be 1.0, 1.5.0, or 1.6.0 or can use the wildcards such as 1.0+ or 1.6+. It denoted the minimum version of the JNLP Specification that this jnlp file can work with.

1.0

codebase

The codebase attribute specifies the base location for all relative URLs specified in href attributes in the JNLP file.

1.0

href

The href specifies the URL of the JNLP file itself.

1.0

version

The version of the application being launched, as well as the version of the JNLP file itself.

1.0

information

The information element contains other elements that describe the application and its source.

1.0

yes

os

Specifies the operating system for which this information element should be considered.

1.5.0

arch

Specifies the architecture for which this information element should be considered

1.5.0

platform

Specifies the platform for which this information element should be considered.

1.5.0

locale

Specifies the locale for which this information element should be considered.

1.5.0

title

The title element specifies the title of the application.

1.0

yes

vendor

The vendor element specifies the provider of the application.

1.0

yes

homepage

The homepage of the application.

1.0

href

A URL pointing to where more information on this application can be found.

1.0

yes

description

A short statement describing the application.

1.0

kind

An indicator as to what type of description this is, legal values are one-line, short, and tooltip.

1.0

icon

Describes an icon that can be used to identify the application to the user.

1.0

href

A URL pointing to the icon file, may be in one of the following formats: gif, jpg, png, ico.

1.0

yes

kind

Indicates the suggested use of the icon, can be: default, selected, disabled, rollover, splash, or shortcut.

1.0

width

Can be used to indicate the resolution of the image.

1.0

height

Can be used to indicate the resolution of the image.

1.0

depth

Can be used to indicate the resolution of the image.

1.0

offline-allowed

Indicates that this application can operate when the client system is disconnected from the network.

1.0

shortcut

The shortcut element can be used to indicate an application's preferences for desktop integration.

1.5.0

online

Can be used to describe the application's preference for creating a shortcut to run online or offline.

1.5.0

desktop

Can be used to indicate an application's preference for putting a shortcut on the user's desktop.

1.5.0

menu

Can be used to indicate an application's preference for putting a menu item in the users start menus.

1.5.0

sub-menu

Can be used to indicate an application's preference for where to place the menu item.

1.5.0

association

Can be used to hint to the JNLP client that it wishes to be registered with the operating system as the primary handler of certain extensions and a certain mime-type.

1.5.0

extensions

Contains a list of file extensions (separated by spaces) that the application requests it be registered to handle.

1.5.0

mime-type

Contains the mime-type that the application requests it be registered to handle.

1.5.0

related-content

Describes an additional piece of related content that may be integrated with the application.

1.5.0

href

A URL pointing to the related content.

1.5.0

yes

update

The update element is used to indicate the preferences for how application updates should be handled by the JNLP Client.

1.6.0

check

Indicates the preference for when the JNLP Client should check for updates. It can be always, timeout, or background..

1.6.0

policy

Indicates the preference for how the JNLP Client should handle an application update when it is known an update is available before the application is launched. It can be always, prompt-update, or prompt-run.

1.6.0

1.0

security

This element can be used to request enhanced permissions.

1.0

all-permissions

Requests that the application be run with all permissions.

1.0

j2ee-application-client-permissions

Requests that the application be run with a permission set that meets the security specifications of the J2EE Application Client environment.

1.0

1.0

resources

Describes all the resources that are needed for an application.

1.0

yes

os

Specifies the operating system for which the resources element should be considered.

1.0

arch

Specifies the architecture for which the resources element should be considered.

1.0

locale

Specifies that the locales for which the resources element should be considered.

java (or java se)

Specifies what version(s) of Java to run the application with.

1.6.0 (java)

version

Describes an ordered list of version ranges to use.

1.0

yes

href

The URL denoting the supplier of this version of java, and where it may be downloaded from.

1.0

java-vm-args

Indicates an additional set of standard and non-standard virtual machine arguments that the application would prefer the JNLP

Client to use when launching Java.

1.0

initial-heap-size

Indicates the initial size of the Java heap.

1.0

max-heap-size

Indicates the maximum size of the Java heap.

1.0

jar

Specifies a JAR file that is part of the application's classpath.

1.0

yes

href

The URL of the jar file.

1.0

yes

version

The requested version of the jar file. Requires using the version-based download protocol

1.0

main

Indicates if this jar contains the class containing the main method of the application.

1.0

download

Can be used to indicate this jar may be downloaded lazily, or when needed.

1.0

size

Indicates the downloadable size of the jar file in bytes.

1.0

part

Can be used to group resources together so they will be downloaded at the same time.

1.0

nativelib

Specifies a JAR file that contains native libraries in its root directory.

1.0

href

The URL of the jar file.

1.0

yes

version

The requested version of the jar file. Requires using the version-based download protocol

1.0

download

Can be used to indicate this jar may be downloaded lazily.

1.0

size

Indicates the downloadable size of the jar file in bytes.

1.0

part

Can be used to group resources together so they will be downloaded at the same time.

1.0

extension

Contains pointer to an additional component-desc or installer-desc to be used with this application.

1.0

href

The URL to the additional extension jnlp file.

1.0

yes

version

The version of the additional extension jnlp file.

1.0

name

The name of the additional extension jnlp file

1.0

ext-download

Can be used in an extension element to denote the parts contained in a component-extension.

1.0

ext-part

Describes the name of a part that can be expected to be found in the extension.

1.0

yes

download

Can be used to indicate this extension may be downloaded eagerly or lazily.

1.0

part

Denotes the name of a part in this jnlp file to include the extension in.

1.0

package

Can be used to indicate to the JNLP Client which packages are implemented in which JAR files.

1.0

name

Package name contained in the jar files of the given part.

1.0

yes

part

Part name containing the jar files that include the given package name.

1.0

yes

recursive

Can be used to indicate that all package names beginning with the given name, can be found in the given part.

1.0

property

Defines a system property that will be available through the System.getProperty and System.getProperties methods.

1.0

name

Name of the system property.

1.0

yes

value

Value it will be set to.

1.0

yes

1.0

Note: A jnlp file must contain one of application-desc, applet-desc, component-desc, or installer-desc

1.0

yes

applicaation-desc

Denotes this is the jnlp file for an application.

1.0

main-class

The name of the class containing the public static void main(String[]) method of the application.

1.0

yes

argument

Each argument contains (in order) an additional argument to be passed to main.

1.0

applet-desc

Denotes this is the jnlp file for an applet.

1.0

main-class

This is the name of the main Applet class.

1.0

yes

documentbase

The document base for the Applet as a URL.

1.0

name

Name of the Applet.

1.0

yes

width

The width of the applet in pixels.

1.0

yes

height

The height of the applet in pixels

1.0

yes

param

A set of parameters that can be passed into the applet.

1.0

name

The name of this parameter

1.0

yes

value

The value of this parameter

1.0

yes

component-desc

Denotes this is the jnlp file for a component extension.

1.0

installer-desc

Denotes this is the jnlp file for an installed extension.

1.0

main-class

The name of the class containing the public static void main(String[]) method of the installer.

1.0

yes

Configure your web server's jnlp Mime type settings.

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 if your server is not already configured for jnlp mime type support.

Apache web server Mime type settings

You need to add a mime type entry for jnlp. You can either use the Apache AddType directive inside the Apache httpd.conf file or the .htaccess file, or modify the Apache web server global mime.types file. The location of this mime.types file is specified by the TypesConfig Apache directive. Apache recommends that you use the AddType directive.

If you wish to modify the Apache global TypesConfig file and the file exists in /etc/mime.types, then you might try syntax like the following which will grep for the jnlp entry, and if not found will append an entry for jnlp support.

[joe@webserver /]$ *grep -qs 'application/x-java-jnlp-file' /etc/mime.types || echo 'application/x-java-jnlp-file jnlp' >> /etc/mime.types*
[joe@webserver /]$ 

Or, if you wish to modify an .htaccess file in your http://www.example.com/appx/ directory, and your web server is configured to allow .htaccess modifications then try the following syntax which will grep for the jnlp entry, and if not found will append an entry for jnlp support.

[joe@webserver /]$ *grep -qs 'application/x-java-jnlp-file' /var/www/html/appx/.htaccess || echo 'AddType application/x-java-jnlp-file jnlp' >> /var/www/html/appx/.htaccess* 
[joe@webserver /]$ 

Microsoft IIS web server Mime type settings

Windows 2000 IIS Server

Start the IIS Management Console and perform the following steps:

  • Right-click server computer in left pane, then select Properties from the drop-down menu.
  • In the 'Computer MIME Map,' click the [Edit] button.
  • The File Types window is displayed. Click New Type.
  • In the File Type box, enter the following in the Associated Extension edit box:
    • jnlp
  • In the Content Type (MIME) box, enter:
    • Application/x-java-jnlp-file jnlp
  • Click [Ok] to close the File Type box. Click [Ok] again to close the File Types Window. Click [Ok] in the Server properties window to save the changes. Restart the IIS Admin Service.
Windows Server 2003 and XP IIS Server

Start the IIS Management Console and perform the following steps:

  • Right-click server computer in left pane, then select Properties from the drop-down menu.
  • In the HTTP Headers tab, click [MIME Types].
  • The MIME Types window displays. Click [New].
  • In the MIME Type box, enter the following in the Extension edit box:
    • jnlp
  • In the MIME type box, enter:
    • Application/x-java-jnlp-file jnlp
  • Click [OK] to close the MIME Type box. Click [OK] again to close the MIME Types Window. Click [OK] in the Server properties window to save the changes. Restart the IIS Admin Service.
Windows Vista IIS Server

Start the IIS Management Console and perform the following steps:

  • Double-click the MIME Types module.
  • The MIME Types window displays. Click [Add] in the Action panel.
  • The Add MIME Type window displays. Enter the following in the File Name Extension box:
    • jnlp
  • In the MIME Type box, enter:
    • Application/x-java-jnlp-file jnlp
  • Click [OK] to close the MIME Type window. Restart the IIS Admin Service.
That's all there is to publishing APPX Desktop Client utilizing Java Web Start technology.

Troubleshooting tips

  • To clear the Web Start Cache
    • javaws -uninstall This will remove all cached applications.
  • Clear Browser's temporary files.

Comments:

Read what other users have said about this page or add your own comments.


-- JoeOrtagus - 04 Mar 2009


This topic: Main > WebHome > SystemAdministration > LaunchingAPPXDesktopClientFromWebPageViaJavaWebstart
Topic revision: r73 - 2016-03-03 - JeanNeron
 
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