WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

Running Thin application client code on a server machine

This topic provides the steps necessary to run Thin application client code on a server machine.

Before you begin

You must install WebSphere Application Server before performing this task.

Procedure

  1. Set up the Thin application client environment.
    [Windows] Use the setupCmdLine shell.
    app_server_root\bin\setupCmdLine.bat
    
    [AIX] [Linux] [HP-UX] [Solaris] Use the setupCmdLine shell.
    app_server_root/bin/setupCmdLine.sh
  2. Run the Java compilation command to compile your client application.
    [Windows]
    "%JAVA_HOME%\bin\javac" -classpath "%WAS_CLASSPATH%; 
    <list_of_your_application_jars_and_classes> " -extdirs %WAS_EXT_DIRS% 
    <your_application_class>.java
    [AIX] [Linux] [HP-UX] [Solaris]
    $JAVA_HOME/bin/javac -classpath "$WAS_CLASSPATH: 
    <list_of_your_application_jars_and_classes>" -extdirs $WAS_EXT_DIRS 
    <your_application_class>.java
  3. Run the application client.
    [Windows] Perform one of the following methods:
    • Run a Java command to call your main class directly.[Version 6.0.1]
      "%JAVA_HOME%\bin\java" %WAS_LOGGING%" 
      -Djava.security.auth.login.config="%app_server_root%\properties\wsjaas_client.conf" 
      -Djava.ext.dirs="%JAVA_HOME%\jre\lib\ext;%WAS_EXT_DIRS%;%WAS_HOME%\plugins;%WAS_HOME%\lib\WMQ\java\lib" 
      -Djava.naming.provider.url=<an_IIOP_URL_or_a_corbaloc_URL_to_your 
      application_server_machine_name>
      -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory 
      -Dserver.root="%WAS_HOME%" "%CLIENTSAS%" "%CLIENTSSL%" %USER_INSTALL_PROP% 
      -classpath "%WAS_CLASSPATH%;<list_of_your_application_jars_and_classes>" 
      <fully_qualified_class_name_to_run> <your_application_parameters>
      For more information on IIOP and corbaloc URLs, see Developing applications that use JNDI.
    • Enter a command to use the WebSphere Application Server launcher.
      "%JAVA_HOME%\bin\java" %WAS_LOGGING%
      -Djava.security.auth.login.config="%app_server_root%\properties\wsjaas_client.conf"
      -classpath "%WAS_CLASSPATH%;<list_of_your_application_jars_and_classes>
      -Djava.ext.dirs="%WAS_EXT_DIRS%;%WAS_HOME%\plugins"
      -Djava.endorsed.dirs="%WAS_ENDORSED_DIRS%
      -Djava.naming.provider.url=iiop://<your_application_server_machine_name>
      -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory  
      %SERVER_ROOT% %CLIENTSAS% %CLISENTSSL% <fully_qualified_class_name_to_run>
    [AIX] [Linux] [HP-UX] [Solaris] Perform one of the following methods:
    • Run a Java command to call your main class directly.
      "$JAVA_HOME/bin/java" "WAS_LOGGING"
      -Djava.security.auth.login.config="$app_server_root/properties/wsjaas_client.conf"
      -Djava.ext.dirs="$JAVA_HOME/jre/lib/ext:$WAS_EXT_DIRS:$WAS_HOME/plugins: $WAS_HOME/lib/WMQ/java/lib" 
      -Djava.naming.provider.url=<an_IIOP_URL_or_a_corbaloc_URL_to_your 
      application_server_machine_name>
      -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
      -Dserver.root="$WAS_HOME" $USER_INSTALL_PROP "$CLIENTSAS" "%CLIENTSSL%"
      -classpath "$WAS_CLASSPATH;<list_of_your_application_jars_and_classes>"
      <fully_qualified_class_name_to_run> <your_application_parameters>
      For more information on IIOP and corbaloc URLs, see Developing applications that use JNDI.
    • Enter a command to use the WebSphere Application Server launcher.
      "$JAVA_HOME/bin/java" "WAS_LOGGING"
      -Djava.security.auth.login.config="$app_server_root/properties/wsjaas_client.conf"
       "-Dws.ext.dirs=<list_of_your_application_jars_and_classes>
      $WAS_EXT_DIRS;$WAS_USER_DIRS" 
      -Djava.naming.provider.url=<an_IIOP_URL_or_a_corbaloc_URL_to_your 
      application_server_machine_name>
      -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory  
      "-Dserver.root=$WAS_HOME" 
      "$CLIENTSAS" "$CLIENTSSL" $USER_INSTALL_PROP -classpath "$WAS_CLASSPATH" 
      com.ibm.ws.bootstrap.WSLauncher 
      <fully_qualified_class_name_to_run> <your_application_parameters>

Example

View the Samples gallery for more information about the Application Client.




Related concepts
Thin application clients
Related tasks
Running Thin application client code
Developing applications that use JNDI
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tcli_developthinserver.html

© Copyright IBM Corporation 2002, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)