The Java EE 6 Tutorial, Volume I

Building, Packaging, and Deploying the cart Example Using Ant

    Now you are ready to compile the remote interface (, the home interface (, the enterprise bean class (, the client class (, and the helper classes ( and

  1. In a terminal window, go to this directory:

  2. Type the following command:


    This command calls the default target, which builds and packages the application into an EAR file, cart.ear, located in the dist directory.

  3. Type the following command:

    ant deploy

    cart.ear will be deployed to the Application Server.