The Java EE 6 Tutorial

ProcedureTo Build, Package, and Deploy the converter Example Using Ant

  1. In a terminal window, go to:


    tut-install/examples/ejb/converter/
  2. Type the following command:


    ant all
    

    This command calls the default task, which compiles the source files for the enterprise bean and the servlet, placing the class files in the build subdirectory (not the src directory) of the project. The default task packages the project into a WAR module: converter.war. For more information about the Ant tool, see Building the Examples.


    Note –

    When compiling the code, the ant task includes the Java EE API JAR files in the classpath. These JARs reside in the modules directory of your GlassFish Server installation. If you plan to use other tools to compile the source code for Java EE components, make sure that the classpath includes the Java EE API JAR files.