Take the 2-minute tour ×

How can I bind a 3rd party library (.jar file) in my java source? Are there any tutorials for this?

share|improve this question
What do you mean "bind" ? You mean use it? –  Brian Roach Apr 16 '11 at 20:09
i mean to attach it to project so i can access its functions –  user711510 Apr 16 '11 at 20:10
He said eclipse right in the title ... the process is the same for virtually all versions of eclipse –  debracey Apr 16 '11 at 20:14
Sorry, missed that... I may be weird, but most times I find myself reading the question and ignoring the title, which is why it annoys me when the question is not self-contained. It's like those "as the subject says" e-mail messages I get sometimes... –  thkala Apr 16 '11 at 20:17
add comment

2 Answers

I normally drag-and-drop the jar file in the project (in a suitable folder), and then right click it and select Build path -> Add to build path.

You can now use it in your project.

share|improve this answer
add comment
  1. Right click the project in question
  2. Point to build path
  3. Click "Configure Build Path" in the menu that open
  4. Click "Add External JARs" -- find your JAR
  5. Click OK

You'll need to package your external JAR with your main application if you distribute it. But that'll at least get you going in Eclipse.

-- Dan

share|improve this answer
add comment

Your Answer

