Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

Packaging an Application Client Using the ACC

The package-appclient script, located in the install-dir/bin directory, is used to package a client application into a single appclient.jar file. Packaging an application client involves the following main steps:

Editing the Configuration File

Modify the environment variables in asenv.conf file located in the install-dir/config directory as shown below:

Editing the appclient Script

Modify the appclient script file as follows:


Change $CONFIG_HOME/asenv.conf to your-ACC-dir/config/asenv.conf.


Change %CONFIG_HOME%\config\asenv.bat to your-ACC-dir\config\asenv.bat

Editing the sun-acc.xml File

Modify sun-acc.xml file to set the following attributes:

For more information on the sun-acc.xml file, see The sun-acc.xml File.

Setting Security Options

You can run the application client using SSL with certificate authentication. To set the security options, modify the sun-acc.xml file as shown in the code illustration below. For more information on the sun-acc.xml file, see The sun-acc.xml File.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE client-container SYSTEM 
  <target-server name="qasol-e1" address="qasol-e1" port="3700">
      <ssl cert-nickname="cts"
      <cert-db path="ignored" password="ignored"/> <!-- not used -->
  <client-credential user-name="j2ee" password="j2ee"/>
  <log-service level="WARNING"/>

ProcedureTo use the package-appclient script bundled with the Application Server

  1. Under install-dir /bin directory, run the package-appclient script.

    For details, see the Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Reference Manual.

    This creates an appclient.jar file and stores it under install-dir/lib/appclient/ directory.

    Note –

    The appclient.jar file provides an application client container package targeted at remote hosts and does not contain a server installation. You can run this file from a remote machine with the same operating system as where it is created. That is, appclient.jar created on a Solaris platform does not function on Windows.

  2. Copy the install-dir /lib/appclient/appclient.jar file to the desired location.

    The appclient.jar file contains the following files:

    • appclient/bin - contains the appclient script used to launch the ACC.

    • appclient/lib - contains the JAR and runtime shared library files.

    • appclient/lib/appclient - contains the following files:

      • sun-acc.xml - the ACC configuration file.

      • client.policy file- the security manager policy file for the ACC.

      • appclientlogin.conf file - the login configuration file.

      • client.jar file - created during the deployment of the client application.

    • appclient/lib/dtds - contains sun-application_client-container_1_0.dtd, which is the DTD corresponding to sun-acc.xml.