Using License Keys > > Using License Keys > Deploying an Application > Before You Start

Please ensure that you have completed the tasks described here before attempting to deploy your application.

Determining the JAR Files to Be Deployed

The JAR files that make direct API calls to ILOG product_name need to be deployed. There can be a single JAR file or multiple JAR files. The JAR files of ILOG product_name products do not need to be deployed. If you repackage the ILOG product_name JAR files by unpacking them and rejarring them with your application classes, you will need to deploy the repackaged JAR file as well.

Declaring the Application Name in the Application

The deployed application has to have a declared name. This name is the one that you supplied to ILOG to obtain your RUNTIME keys. Even if you possess one or several development keys not specially bound to a particular application, it is necessary to give a name to the application you want to deploy. This name will be bound to the RUNTIME key used for the deployment. The application name has to be declared through a function call (IlvProductUtil) like this:

IlvProductUtil.registerApplication("application name");

The call to registerApplication needs to be in the JAR that is being deployed or in one of the JAR files, if there are several being deployed.

This call must be executed before any service of the ILOG product is used, otherwise the license check may fail. It can be executed in a constructor that is executed once only, at the startup of the application, or in static initializers. Since static initializers can lead to problems that are difficult to debug, the former way of calling registerApplication is preferred.

Checking You Have the Relevant Keys

For every ILOG product used by your application, you have to possess two keys: a development key and its associated RUNTIME key.

Checking that keys.jlm Is Accessible

Check that the keys.jlm file is accessible from one of the CLASSPATH directories.

Note
When the jlmdeploy tool is run from the command line or as a GUI application, it looks in the jlm/ directory in the installation directory, where the keys.jlm file is normally located, only after a search of the CLASSPATH that is provided as an environment variable.

Completing All Development Tasks

If you perform some other processing on your JAR files, such as obfuscation or removal of unused methods, these steps must be performed before you run jlmdeploy. In other words, jlmdeploy is the last step before shipping a JAR.

The jlmdeploy tool must be the last tool in the deployment chain, except for jarsigner.

If you intend to deploy your JAR using the Pack200 utility of JDK 1.5, you will need to normalize the JAR before running jlmdeploy. Normalizing a JAR relative to the Pack200 compressor can be done by using the pack200 --repack command.