HP-UX Java SIP Stack Programmer's Guide (February 2008)
4 Compiling and Running Applications Using the HP-UX
JSR32 Kit
This chapter describes how to compile and run applications that use the JSR32 APIs.
Follow this procedure to compile and run applications that use JSR32 APIs:
1. Set the PATH variable to the specific Java Development Kit (JDK) version, as
specified in the following example:
export PATH=$PATH:/opt/java1.5/bin
2. Set the class path to the location of the following jar files:
• JainSipApi1.2.jar
• JainSipRi1.2.jar
• concurrent.jar
• log4j-1.2.8.jar
3. To compile an application, enter the following command:
javac -classpath <jarfile1;jarfile2;.....> <app_name>
where:
jarfile Specifies the relative path to the jar files.
app_name Specifies the application.
Example 4-1 Compiling an Application
To compile an application named appl.java, enter the following command if
the jar files are located in the current working directory:
javac -classpath JainSipApi1.2.jar:JainSipRi1.2.jar:
concurrent.jar:log4j-1.2.8.jar appl.java
4. To run an application, enter the following command:
java -classpath <jarfile1:jarfile2:.....> app_name <argument>
where:
jarfile Specifies the relative path to the jar files.
app_name Specifies the application.
argument Specifies arguments, if any.
Example 4-2 Running an Application
Following is a sample command to run an application named appl.java:
java -classpath JainSipApi1.2.jar:JainSipRi1.2.jar:
concurrent.jar:log4j-1.2.8.jar appl
55