Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a JAR to an Eclipse Java library

Tags:

eclipse

jar

How do you add a JAR file to an already existing Java library in Eclipse? Note that this is not a user library.

That is, if you look at the Java Build Path for a Java project and click on the Libraries tab, you will see the list of libraries used by the project. If you expand a given library, you will see a list of JAR files included in that library. I want to add an additional JAR file to one of these libraries.

I am using Version 3.4.0 of Eclipse.

like image 279
Paul Reiners Avatar asked Oct 07 '08 15:10

Paul Reiners


People also ask

Why can't I add external JARs in Eclipse?

If your project builds with Java 9+ make sure you've selected Classpath (as shown here). You should also be able to add the JAR with right-click on the project > Build Path > Add External Archives.... If that doesn't help, would you tell use the version and package of Eclipse IDE you're using?

How do I add a jar file to a Web INF library?

From the ToolBar to go Project> Properties>Java Build Path > Add External Jars . Locate the File on the local disk or web Directory and Click Open. This will automatically add the required Jar files to the Library.


2 Answers

In eclipse Galileo :

  • Open the project's properties
  • Select Java Build Path
  • Select Libraries tab

From there you can Add External Jars

like image 191
Jla Avatar answered Sep 23 '22 21:09

Jla


In Eclipse Ganymede (3.4.0):

  1. Select the library and click "Edit" (left side of the window)
  2. Click "User Libraries"
  3. Select the library again and click "Add JARs"
like image 22
idrosid Avatar answered Sep 23 '22 21:09

idrosid