blob: 13e72203daac6cce475d4bf8a2a345a25dad772c [file] [log] [blame]
<!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 to the build path
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
</head>
<body>
<h1>
Adding a JAR file to the build path
</h1>
<p>
You can add a JAR file stored either in the workbench or anywhere in your file system to the build class path.
</p>
<p>
To add a JAR to your build class path follow these steps:
</p>
<ol>
<li>
Select the project, and from its pop-up menu, select <strong>Properties</strong>.
In the Properties dialog, select the <strong>Java Build Path</strong> page.<br>
Click the <strong>Libraries</strong> tab.<br>
You can now either add a JAR file which is contained in your workspace or which is somewhere else:
<ul>
<li>
to add a JAR file which is inside your workspace click the <strong>Add JARs</strong> button
</li>
<li>
to add an external JAR file click the <strong>Add External JARs</strong> button
</li>
</ul>
</li>
<li>
In the dialog that appears, select the JAR file that you want to add.
Note that you can add multiple JARs at once.</li>
</ol>
<p>
Alternatively, to add an external JAR to your build class path follow these steps:
</p>
<ol>
<li>
Select the project, and from its pop-up menu, select <strong>Build Path &gt; Add external archives</strong>.
</li>
<li>
In the dialog that appears, select the JAR file that you want to add.
Note that you can add multiple JARs at once.</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-112.htm">Adding a class folder to the build path</a><br>
<a href="tasks-106.htm">Building a Java program</a><br>
<a href="tasks-108.htm">Building automatically</a><br>
<a href="tasks-109.htm">Building manually</a><br>
<a href="tasks-33.htm">Creating a new JAR file</a><br>
<a href="tasks-111.htm">Viewing and editing a project's build path</a><br>
<a href="tasks-110.htm">Working with build paths</a>
</p>
<p>
<img src="../images/ngrelr.png" alt="Related reference" border="0" ><br>
<a href="../reference/ref-123.htm">Java Build path</a>
</p>
</body>
</html>