Develop Thin application client code on a client machine
Before you begin
You must install the Thin application client from the Application Client for WAS installation before performing this task. For more information, see Developing thin application client code.
Procedure
- Set the Java application thin client environment by using the setupClient shell, located in: Windows systems
UNIX platformsinstall_root\AppClient\bin\setupClient.batinstall_root/AppClient/bin/setupClient.sh- Run the following Java compilation command to compile your client application. On Windows systems, enter
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$JAVA_HOME/bin/javac -classpath "$WAS_CLASSPATH: <list of your application jars and classes>" -extdirs $WAS_EXT_DIRS <your application class>.java- Run the following Java command to invoke your client application: On Windows systems, enter
On UNIX 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>For more information on IIOP and corbaloc URLs, see Developing applications that use JNDI.$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>
ExampleSamples gallery
Related Tasks
Developing Thin application client code
Developing applications that use JNDI
See Also
Thin application clients