The Java EE 5 Tutorial

Modifying a Class File

    To modify a class file in an enterprise bean, you change the source code, recompile it, and redeploy the application. For example, if you want to change the exchange rate in the dollarToYen business method of the ConverterBean class, you would follow these steps.

  1. Edit ConverterBean.java.

  2. Recompile ConverterBean.java.

    1. In a terminal window, go to the tut-install/javaeetutorial5/examples/ejb/converter/ subdirectory.

    2. Type the following command:


      ant
      

      This command runs the default task, which repackages the entire application (application client, enterprise bean JAR, and web client).

  3. Type the following command:


    ant deploy
    

To modify the contents of a WAR file, or to modify the application client, follow the preceding steps.