| <!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> |
| Attaching source to a class path variable |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Attaching source to a class path variable |
| </h1> |
| <p> |
| When attaching source for a class path variable entry, both the path to the <strong>Archive</strong> and the <strong>Root Path</strong> must be defined by |
| variables. Follow these steps to make a source attachment for a variable: |
| </p> |
| <ol> |
| <li> |
| Select the project, and from its pop-up menu, select <strong>Properties</strong>.<br> |
| In the Properties dialog, select the Java Build Path page. |
| </li> |
| <li> |
| On the <strong>Libraries</strong> tab, select the class path variable to which you want to attach source.<br> |
| Expand the node by clicking on the plus and select the node <em>Source Attachment</em>. Click the <strong>Edit </strong> button to bring up the source attachment dialog. |
| </li> |
| <li> |
| In <strong>Location variable path</strong> field, use a variable to define the location of the archive. Use |
| the <strong>Variable</strong> button to select an existing variable and the <strong>Extension</strong> button to append an |
| optional path extension.</li> |
| <li> |
| Click <strong>OK</strong>. |
| </li> |
| </ol> |
| <p> |
| or |
| </p> |
| <ol> |
| <li> |
| Select the JAR file in the Package Explorer, and from its pop-up menu, select <strong>Properties</strong>.<br> |
| In the Properties dialog, select the <strong>Java Source Attachment</strong> page. |
| </li> |
| <li> |
| In <strong>Location variable path</strong> field, use a variable to define the location of the archive. Use |
| the <strong>Variable</strong> button to select an existing variable and the <strong>Extension</strong> button to append an |
| optional path extension.</li> |
| <li> |
| Click <strong>OK</strong> . |
| </li> |
| </ol> |
| |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0" > |
| <p> |
| <a href="../concepts/cclsspthv.htm">Classpath variables</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.png" alt="Related tasks" border="0" > |
| </p> |
| <p> |
| <a href="tasks-114.htm">Adding a variable class path entry</a><br> |
| <a href="tasks-117.htm">Defining a class path variable</a><br> |
| <a href="tasks-118.htm">Deleting a class path variable</a> |
| </p> |
| <p> |
| <img src="../images/ngrelr.png" alt="Related reference" border="0" > |
| </p> |
| <p> |
| <a href="../reference/ref-15.htm">Classpath Variables preference page</a><br> |
| <a href="../reference/ref-124.htm">Source Attachment dialog</a><br> |
| |
| </p> |
| |
| </body> |
| </html> |
| |