How do I import third-party libraries for an Eclipse project?

Asked

Viewed 1,284 times

1

I’m trying to use two third-party libraries for a Java project in Eclipse: iText (to generate a PDF) and Javamail (to send this PDF by email), but I’m not able to or import them...

I’ve tried everything. I’ve already dragged the folder to the /src of my project, I’ve been through botão direito > Import..., I’ve been to the Properties of the project... I’ve done everything, but I’m not able to add the libraries to my CLASSPATH.

I’m having two main difficulties:

1) The libraries' folders are FULL of files, and I don’t understand anything. There’s a thousand .jar. I don’t know which one I need to play into the Eclipse.

2) When I play ALL files (either by Import..., whether playing the entire folder, some parts of libraries are imported, but others are not. For example: com.itextpdf.text yes, quiet, but com.itextpdf.text.Document no. Similar thing occurs with Javamail.

What I need?

From a REALLY GOOD tutorial, to someone WHO IS STARTING NOW... All I think skip many steps and I get lost. Most of them don’t even talk like they throw the library into the eclipse. And the others - who talk -, they talk like it’s the simplest thing in the world.

I’m going crazy anyway.

Thanks in advance.

  • good, in eclipse to import a jar you need to right click on the project, go to Build Path > Configure Build Path, will open a window, in it you go in the tab Libraries, now just click on Add JARs... you can copy them all into a folder within your project.

  • 1

    But ahead, I suggest you use some dependency manager like the Maven or the Gradle

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.