Packaging

Following is a list of some of the techniques and tools that can be used to package applications ready for deployment to a device. The list is not a full list and does not go into any detail but is intended to provide an introduction to some of the ways a Java application can be packaged.

Single Jar file

Build a self-contained application with MQe embedded in it. This option minimizes the footprint and ensures that the classpath is kept to a minimum.

Multiple Jar files

Put the application into one jar file, and then also use either the supplied MQe jar files or construct a separate MQe jar file. Keeping MQe in one or more separate jars makes it easy to use MQe from multiple independent applications.

JNLP

JNLP (Java Network Launching Protocol and API) is an emerging standard for use in packaging and deploying Java applications. It is designed to automate the deployment, via the web, for applications written for the J2SE platform.

OSGi

OSGi or Open Services Gateway Initiative defines define a platform for the packaging of and dynamic delivery of Java software services to networked devices. This is achieved via a consistent, component-based, architecture for the development and delivery of Java software components known as bundles and services. Both MQe components and applications can be turned into OSGi bundles and services for use in an OSGi environment. The bundles are delivered from a bundle server There are several products that provide bundle servers together with the client code to handle the installation and lifecycle of bundles. Depending on implementation the bundles can be downloaded on demand, and updated automatically when a new version is available. IBM WSDD (WebSphere Studio Device Developer) ships with SMF (Service Management Framework), which assists in the creation and testing of bundles together with a bundle server.

See more at Open Services Gateway initiative (OSGi).

Midlet

An MQe J2ME MIDP application must be packaged as a midlet or midlet suite (.jad and .jar).

Palm specific

In order to run on a Palm device a Java application must to be packaged in a prc file, which is a Palm specific format. The IBM WebSphere Studio Device Developer product ships with a tool that will package a Java application as a prc file.

JXE

IBM WebSphere Studio Device Developer has a SmartLinker tool that can produce an optimized packaging of an application that contains the minimum set of required classes and methods for the deployment platform. The output from the smartlinker is stored in a .JXE file which is understood by the IBM j9 Java runtime.

Installer

There are several tools that will package an application ready for installation on one or more platforms. A couple of examples of these are InstallShield and self extracting zip files.

Roll your own distribution mechanism

For instance using a Java class loader that can load classes over a network.

Parent topic: Java deployment