Importing JAR files to EJB 3.0 projects

You can use the Import wizard to add EJB 3.0 classes or a POJO class from JAR files to an EJB 3.0 project. You can import the class files from the directory system or from a JAR file or ZIP file. After you choose the class files that you want to import, the wizard creates a

<project-name> folder, imports the specified class files to that folder, and adds the folder to the default class path. You can navigate the

<project-name> folder in the Enterprise Explorer view.

To import class files to a EJB 3.0 project using the wizard:

  1. Right-click your EJB 3.0 project and select

    Import | EJB | EJB Jar file. The Import wizard opens.

  2. In the EJB Jar Import page, beside the

    EJB Jar file field, click the Browse button to locate the directory or file on your system. When you select the JAR file, the default project name for it appears in the

    EJB Project field. You can accept the default, or type an alternate project name.

  3. You can add this Jar file to an EAR file.

  4. Click Finish. The wizard imports the JAR files to the

    <project-name> folder.

 

Related concepts

Creating enterprise beans