| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]"> |
| <title> |
| Adding a JAR file as a library |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Adding a JAR file as a library |
| </h1> |
| <p> |
| To add a JAR file as a library, you can either drag and drop the JAR file into the workbench from the file system or you can use the Import wizard to import the file. |
| </p> |
| <ol> |
| <li> |
| From the workbench menu bar, select <strong>File</strong> > <strong>Import</strong>. The Import wizard opens |
| </li> |
| <li> |
| Select <strong>File System</strong>, then click <strong>Next</strong>. |
| </li> |
| <li> |
| In the <strong>From directory</strong> field, type or browse to select the directory where the JAR file resides. |
| </li> |
| <li> |
| In the import selection panes, expand the hierarchy and use the buttons to select the JAR file you want to import. |
| </li> |
| <li> |
| In the <strong>Into folder</strong> field, type or browse to select a workbench container for the JAR file. |
| </li> |
| <li> |
| Click <strong>Finish</strong> when you are done. |
| </li> |
| <li> |
| You now must add the JAR file to the build class path of any projects that need this library. |
| </li> |
| </ol> |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0" > |
| <p> |
| <a href="../concepts/concepts-4.htm">Java builder</a><br> |
| <a href="../concepts/cbuildcp.htm">Build classpath</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.png" alt="Related tasks" border="0" > |
| </p> |
| <p> |
| <a href="tasks-113.htm">Adding a JAR file to the build path</a><br> |
| <a href="tasks-115.htm">Attaching source to a JAR file</a><br> |
| <a href="tasks-110.htm">Working with build paths</a><br> |
| <a href="tasks-31.htm">Adding source code as individual files</a> |
| </p> |
| <p> |
| <img src="../images/ngrelr.png" alt="Related reference" border="0" > |
| </p> |
| <p> |
| <a href="../reference/ref-123.htm">Java Build Path</a> |
| </p> |
| |
| </body> |
| </html> |
| |