Developing Thin application client code on a client machine

 

Developing Thin application client code on a client machine

You must install the Thin application client from the Application Client for WebSphere Application Server installation before performing this task. For more information, see Developing thin application client code.

  1. On the OS/400 platform, set the Java application thin client environment by using the setupClient script, located in install_root/bin, where install_root is /QIBM/ProdData/WebSphere/AppServer/V6/Base or /QIBM/ProdData/WebSphere/AppServer/V6/ND. Run this command on the CL command line to start the Qshell environment:
    STRQSH

  2. Run this command on the Qshell command line:
    . install_root/bin/setupClient -profileName profileName

    On the Windows platform, run this command:

    install_root\AppClient\bin\setupClient.bat

    On the UNIX platform, run this command:

    install_root/AppClient/bin/setupClient.sh

  3. Run the following Java compilation command to compile your client application.

    On iSeries, enter the following command on the Qshell command line:

    javac -J-Djava.version=1.4 -classpath 
      "$WAS_CLASSPATH:jars_and_classes"
      -extdirs $WAS_EXT_DIRS app_class.java
    On Windows systems, enter:
    "%JAVA_HOME%\bin\javac" -classpath "%WAS_CLASSPATH%; 
    <list of your application jars and classes> " -extdirs %WAS_EXT_DIRS% 
    <your application class>.java
    On UNIX systems, enter:
    $JAVA_HOME/bin/javac -classpath "$WAS_CLASSPATH: 
    <list of your application jars and classes>" -extdirs $WAS_EXT_DIRS 
    <your application class>.java

  4. Run the following Java command to invoke your client application:

    On iSeries, enter the following command on the Qshell command line:

    java ${JAVA_FLAGS_EXT} -classpath "$WAS_CLASSPATH:jars_and_classes" 
      -Djava.naming.provider.url=URL class_name app_parm
    On Windows systems, enter:
    "%JAVA_HOME%\bin\java" %WAS_LOGGING% -Djava.security.auth.login.config="%WAS_HOME%\properties\wsjaas_client.conf"
    -classpath "%WAS_CLASSPATH%;<list of your application jars and classes> -Djava.ext.dirs=%WAS_EXT_DIRS% 
    -Djava.naming.provider.url=iiop://<your WebSphere server machine name> 
    -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory 
    %SERVER_ROOT% %CLIENTSAS% <fully qualified class name to run>
    On UNIX systems, enter:
    $JAVA_HOME/bin/java $WAS_LOGGING 
    -classpath "$WAS_CLASSPATH: <list of your application jars and classes> -Djava.ext.dirs=$WAS_EXT_DIRS 
    -Djava.naming.provider.url=iiop://<your WebSphere server machine name> 
    -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory 
    $SERVER_ROOT $CLIENTSAS <fully qualified class name to run>
    For more information on IIOP and corbaloc URLs, see Developing applications that use JNDI.

ExampleSamples gallery


Related tasks
Developing Thin application client code
Developing applications that use JNDI

Related reference
Thin application clients