I’m a bit new to eclipse and want to use the following libraries so that I can use their implemented objects (HttpClient and Java csv). How do I import these libraries so that I can write some java with them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you’re looking to do is add the libraries to your project’s build path (the class path that will be used while compiling). In Eclipse, you can do this by right-clicking your project and choosing
Properties(or hitting[Alt]+[Enter]when the project is selected inProject Explorer,NavigatororPackage Explorerviews) and thenJava Build Pathfrom the sidebar and theLibrariestab where you can add JARs.Note the difference between
Add JARsandExternal JARsis thatExternal JARswill add an external dependency in your project since the absolute path to the JAR on your filesystem will be put into your project’s configuration. WithAdd JARsyou can select JARs from within your workspace.I find it to be a good practice to create a
libfolder (at the same level as mysrcfolder) and put all my JARs in there and then add them to the build path with theAdd JARsoption. This makes the project portable since there are only relative paths referring to resources within the project rather than absolute paths or resources from other workspace projects.