Classpath in Eclipse

Adding to the JAVA Class Path 

Using Eclipse   

An external JAR file can be added to the Java Class Path inside Eclipse as follows. Note that it is good practice to add a ‘lib’ folder to your Eclipse project to store external JAR files.

Step 1:
Open your Eclipse project.  Create a lib folder in your project using the Package Explorer window panel, and copy the required JAR files to this folder.

Step 2:
Expand your project in the Package Explorer window panel.  Right click on Referenced Library and select Build Path, and then the Configure Build Path option.

Step 3:
In the dialog window that appears, select the Libraries tab at the top.  Click the Add JARs button.  In the resulting dialog box, expand your project from the list of projects, then expand the lib folder, and finally select the required JAR file(s).

If you did not add a lib folder to your project to contain the JAR files, you can click the Add External JARs button.  This opens a dialog box where you can browse your computer for the required JAR files.

Click OK, and then OK again to close the Properties window.

Leave a Reply

Your email address will not be published. Required fields are marked *