Importing class files to an EJB project
You can use the Import wizard to add Java class files to an EJB project.
With the wizard, 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 an imported_classes folder, imports the specified class files to that folder, and adds the folder to the default class path. You can navigate the imported_classes folder in the Project Explorer view.
Tip:You can drag and drop class files from the Windows Explorer or desktop to the imported_classes folder in the Project Explorer view.
To import class files to an EJB project using the wizard:
- In the J2EE perspective, right-click your EJB project and select Import > Import Class Files from the pop-up menu. The Import wizard opens.
- Specify whether you want to Import from directory or Import from ZIP or JAR, and click Next.
- Depending on whether you are importing from a directory, from a JAR file, or from a ZIP file, in the Source field enter the full path of the directory, ZIP file, or JAR file that contains the .class files that you want to import. You can click the Browse button to locate the directory or file on your system.
- Select the class files that you want to import.
- Optional: If you have previously imported class files and do not want to be warned about overwriting resources with the same names, select Overwrite existing resources without warning.
- Click Finish. The wizard imports the .class files to the imported_classes folder.
Related concepts
Annotation-based programming overview
Related tasks
Creating an EJB project
Exporting EJB projects to EJB JAR files
Importing an EJB JAR file