Standalone Client

This document describes how to run and pass parameters to the standalone client from a command line.

You can run the standalone client for Nexaweb Java applications only.

Command Line Syntax

The command line syntax to run the Nexaweb standalone client takes the following format:

  java -classpath classname parameters 

The actual minimal command line syntax appears similar to the following:

  java -classpath NexawebImages.jar;NexawebStandaloneClient.jar 
  com.nexaweb.client.standalone.StandaloneClient 
  -server http://server-name:8080 
  -initialPage index.xal -appcontext /AppContext

The command format parts appear in this example as:

  • classpath:    -classpath NexawebImages.jar;NexawebStandaloneClient.jar
  • classname:  com.nexaweb.client.standalone.StandaloneClient
  • parameters: -server http://server-name:8080 -initialPage index.xal -appcontext /AppContext


Classpath

The classpath section of the command line syntax includes a semi-colon (;) separated list of the classes required to run an application in the standalone client.

The required classes include the following JARs, available in the Nexaweb Platform/bin directory: 

ClassDescription

NexawebImages.jar

Standalone client images
NexawebStandaloneClient.jar Standalone client classes

In addition, you must specify any class JAR files that the application requires on the client-side to run. 

Finally, if running legacy Nexaweb NXML applications, you must include the following:

ClassDescription
nexaweb-nfc.jar

Nexaweb Foundation classes. Required for NXML applications only.


Classname

You can use either:

  • com.nexaweb.client.standalone.StandaloneClient

        or

  • com.nexaweb.client.desktop.DesktopClient 

    The classname: com.nexaweb.client.desktop.DesktopClient runs both the standalone and desktop clients. Which of these runs, depends upon what classes you specify in the classpath at the command line. If you specify the standalone classes, the standalone client runs, and so forth with the desktop client.

Parameters

The parameters section of the command line syntax includes a name-value pair list of parameters. You can specify at the command line any of the parameters typically set by the nexaweb-client.xml configuration file when an application launches from a browser.

The following table lists the parameters required to run the application: 

ParameterDescription

-server http://servername:8080

The name of the system and port number on which to run the application.


-initialPage index.xal

The name of the initial page that the application loads.

-appcontext /TestAppThe location and name of the application to run.

In addition to these required parameters, if the application uses plug-ins, you must include parameters specifying the plug-ins that it uses. 

The plug-in JAR files appear in a Nexaweb Java application project's WebContent/WEB-INF/client/plugins directory and must be loaded onto the server. When you use Nexaweb Studio to develop an application, Nexaweb Studio automatically places these JARs in this directory and they get loaded onto the server. If you do not use Nexaweb Studio to create the application, you must make sure to load plug-in JAR files onto the server.

The following table shows the format for specifying plug-ins and lists other commonly used parameters that you can optionally set at the command line:  

ParameterDescription

-log-configuration@default-log-level exception

The default log level at which you want to capture log messages for the application.


-plugin-key-0 nxplugin-PluginAccessibility

You must specify any Nexaweb plug-in that the application requires to run using the following name-value pair format:

Name
- plugin-key-# incremented by one for each plug-in you specify

Value
- The prefix: nxplugin-
- And name of the plug-in JAR file (excluding the JAR extension)

-log-configuration/consumers/consumer1 com.nexaweb.client.log.DialogLogConsumerThe names of any log consumers to run using the following name-value pair format:

Name
-log-configuration/consumers/consumers# incremented by one for each log consumer you specify

Value
The class name of the log consumer to run.

Note: When launched in a browser, the Nexaweb standalone client by default starts the DialogLogConsumer (com.nexaweb.client.log.DialogLogConsumer), for displaying a modal dialog; and the ConsoleLogConsumer (com.nexaweb.util.ConsoleLogConsumer), for printing messages to the Java console.

-launch-ui-bgcolor #FFFFFF

Specifies the default background color of the UI when launched.
-debug-keys-enabled trueEnables debug keys such as F2, which prints the UI DOM to the java console. The default value is false.
-persistent-connection-ping-interval 60000When using a push or other persistent connection, this parameter specifies how long the server waits between sending ping requests to the client.
-application-type XALSpecifies the application type, if not XAL. Use this parameter for legacy versions of Nexaweb applications to specify the application type as NXML.
-width 800Initial application launch size setting.
-height 600Initial application launch size setting.
-x 240Initial application launch size setting.
-y 212Initial application launch size setting.
-splash classpath://Nexaweb/stylesheets/nexaweb2004/images/messagedialog_warn.gifThe image file that will be displayed as splash screen
-splashTime 5000Minimum amount of time in milliseconds for which splash screen is displayed.