Using License Keys > > Using License Keys > Deploying an Application > Using jlmdeploy from the Command Line

This topic describes how to invoke jlmdeploy and the various command line options that you can use to control the deployment of your application.

Invoking jlmdeploy

To use jlmdeploy in command line mode you supply the run.bat command (on Microsoft® Windows systems) or the run.sh command (on UNIX systems), with one or more options. These command files are located in the bin/jlmdeploy directory. If no options are supplied, the GUI version is launched.

Invoking the Functionalities

When you use the command line, you can use a number of different options. You should note, however, that the different functionalities, for example, deploying a JAR and viewing a deploy.txt file, are exclusive. Therefore, if you use options belonging to different functionalities in the same invocation, an error is signalled.

Short and Long Form Options

Options can have two forms:

Required Arguments

You must supply at least the name of the deployed application with --application option and the JAR that contains your own code. Thus, the minimal required form to deploy an application is:

Windows-prompt> cd jlmdeploy
Windows-prompt> run.bat --application "myapp" MyApplication.jar
Unix-prompt> jlmdeploy/run.sh --application "myapp" MyApplication.jar

--output deployed.jar option

By default, the deployed JAR is named by changing the suffix of the initial JAR file from `.jar' to `.deployed.jar'. Thus, given the above command, the deployed JAR will be named MyApplication.deployed.jar. You can change the output name of the deployed JAR with the --output option followed by the new name you want to give. However, you cannot give the same name as the undeployed JAR file.

--product product_name version option

The standard behavior is to write the deploy.txt with any valid development and runtime keys pair found in your keys.jlm. You can control this more precisely with the following options:

--product product_name version will check that deploy.txt contains a valid key for product_name and that its version is equal to or higher than the declared version. You can repeat the --product option for as many products as you want. For example:

--product JViews-Charts 6.5 --product JTGO 4.5 

--no-warning product_name option

The jlmdeploy command warns you if the keys.jlm contains valid development keys but no associated RUNTIME keys. This is because if you deliver your deployed JAR to your customers without the RUNTIME keys the application will fail to launch. If, however, you are not going to use some of the JViews products, you can specify the --no-warning option for each of those unused products. For example:

--no-warning JViews-Charts --no-warning JViews-Maps

--warnings-errors option

If you want to ensure that your application JAR has been correctly deployed, you should pass --warnings-errors as a command line option. This can be useful with automatic building tools like ant or make. With this option, warnings are considered as errors and the JAR is not deployed. When there are errors, the jlmdeploy command returns an exit code equal to 1. By convention, a nonzero status indicates abnormal termination.

Miscellaneous Options

The two options in this section must be supplied separately.

--list app.deployed.jar displays the content of deploy.txt file on the console.

--help displays a short description of the allowed syntax.