This section tells you everything you need to know to install, build, and run the examples included in the tutorial bundle.
The following software is required to run the examples.
To build, deploy, and run the examples, you need a copy of Java Platform, Standard Edition 5.0 (Java SE 5.0) or higher. You can download the Java SE 5.0 software from http://java.sun.com/javase/downloads/index_jdk5.jsp. Download the current JDK update that does not include any other software (such as the NetBeans IDE or Java EE).
Communications Server is targeted as the build and runtime environment for the tutorial examples. Communications Server is based on the GlassFish and SailFin open-source projects.
The NetBeans integrated development environment (IDE) is a free, open-source IDE for developing Java programming language applications, including enterprise applications. NetBeans IDE supports the Java EE 5 platform. You can build, package, deploy, and run the tutorial examples from within NetBeans IDE.
Integrate the SailFin plug-in modules, which add SIP application development functionality to NetBeans IDE. The modules are bundled with Communications Server.
In NetBeans IDE, select Tools->Plugins.
Click the Downloaded tab and click Add Plugins.
Navigate to the Install/tools/netbeans directory and select all the files in this directory.
Click Install, then Next.
Select I Agree in the License Agreement window and click Install.
Click Continue to install the unsigned modules, then click Finish.
The tutorial uses several sample applications available on the SailFin website.
Go to the following URL: http://wiki.glassfish.java.net/gfwiki/Wiki.jsp?page=SipExamples.
Follow the instructions to download the SipProxy and SIP Servlet 1.1 Click-To-Dial sample applications.
SIPp is an application to test SIP clients and servers. It is available from http://sipp.sourceforge.net/.
X-Lite is a free multi-platform soft phone used in the examples. It is available from http://www.counterpath.com/x-lite.html&active=4.
Ant is a Java technology-based build tool developed by the Apache Software Foundation (http://ant.apache.org), and is used to build, package, and deploy the tutorial examples. Ant is included with the Communications Server. To use the ant command, add JAVAEE_HOME/lib/ant/bin to your PATH environment variable.
The tutorial examples are distributed with a configuration file for either NetBeans IDE or Ant. Directions for building the examples are provided in each chapter. Either NetBeans IDE or Ant may be used to build, package, deploy, and run the examples.
To run the tutorial examples in NetBeans IDE, you must register your Communications Server installation as a NetBeans Server Instance. Follow these instructions to register the Communications Server in NetBeans IDE.
Select Tools -> Server Manager to open the Server Manager dialog.
Click Add Server.
Under Server, select Sun Java System Application Server and click Next.
Under Platform Location, enter the location of your Application Server installation.
Select Register Local Default Domain and click Next.
Under Admin Username and Admin Password, enter the admin name and password created when you installed Communications Server.
Click Finish.
To facilitate iterative development and keep application source separate from compiled files, the tutorial examples use the Java BluePrints application directory structure.
Each application module has the following structure:
build.xml: Ant build file
src/java: Java source files for the module
src/conf: configuration files for the module, with the exception of web applications
web: JSP and HTML pages, style sheets, tag files, and images
web/WEB-INF: configuration files for web applications
nbproject: NetBeans IDE project files
The Ant build files (build.xml) distributed with the examples contain targets to create a build subdirectory and to copy and compile files into that directory; a dist subdirectory, which holds the packaged module file; and a client-jar directory, which holds the retrieved application client JAR.