| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html lang="en-us" xml:lang="en-us"> |
| <head> |
| <link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" /> |
| <title>Importing class files to an EJB project</title> |
| </head> |
| <body id="teimpclass"><a name="teimpclass"><!-- --></a> |
| |
| <h1 class="topictitle1">Importing class files to an EJB project</h1> |
| <div><p>You can use the Import wizard to add Java class files to an EJB project.</p><div class="skipspace"><p>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 <span class="uicontrol">imported_classes</span> folder, |
| imports the specified class files to that folder, and adds the folder to the |
| default class path. You can navigate the <span class="uicontrol">imported_classes</span> folder |
| in the Project Explorer view.</p> |
| <div class="tip"><span class="tiptitle">Tip: </span><img src="../images/ycwin.gif" alt="The following applies to Windows" /> You can drag and |
| drop class files from the Windows<sup>®</sup> Explorer or desktop to the <span class="uicontrol">imported_classes</span> folder |
| in the Project Explorer view.</div> |
| <p>To import class files |
| to an EJB project using the wizard:</p> |
| </div> |
| <ol><li><span>In the J2EE perspective, right-click your EJB project and select <span class="menucascade"><span class="uicontrol">Import</span> > <span class="uicontrol">Import Class Files</span></span> from |
| the pop-up menu. The Import wizard opens.</span></li> |
| <li><span>Specify whether you want to <span class="uicontrol">Import from directory</span> or <span class="uicontrol">Import |
| from ZIP or JAR</span>, and click <span class="uicontrol">Next</span>.</span></li> |
| <li><span>Depending on whether you are importing from a directory, from a |
| JAR file, or from a ZIP file, in the <span class="uicontrol">Source</span> 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 <span class="uicontrol">Browse</span> button |
| to locate the directory or file on your system.</span></li> |
| <li><span>Select the class files that you want to import.</span></li> |
| <li><strong>Optional: </strong><span>If you have previously imported class files |
| and do not want to be warned about overwriting resources with the same names, |
| select <span class="uicontrol">Overwrite existing resources without warning</span>.</span></li> |
| <li><span>Click <span class="uicontrol">Finish</span>. The wizard imports the .class |
| files to the <span class="uicontrol">imported_classes</span> folder.</span></li> |
| </ol> |
| </div> |
| |
| <div> |
| <p><b class="reltaskshd">Related tasks</b><br /> |
| <a href="../topics/tecrtpro.html" title="An EJB project is used to organize the resources contained in an EJB module.">Creating an EJB project</a><br /> |
| <a href="../topics/teexp.html" title="After you have tested your enterprise beans, you can export the module into an EJB JAR file.">Exporting EJB projects to EJB JAR files</a><br /> |
| <a href="../topics/teimp.html" title="You can import beans and other metadata from an EJB JAR file into a new or existing EJB project.">Importing an EJB JAR file</a><br /> |
| </p> |
| </div> <br /> |
| (C) Copyright IBM Corporation 2000, 2005. All Rights Reserved. |
| </body> |
| </html> |