0

I would like to create a test project in Eclipse. My goal is to add AND USE all the class files from the library. How would I do that ? It's this particular library https://github.com/twitter/hbc. I know how to import class files in XCode (Mac/iOS), but whenever I worked with Eclipse it has always been the import which produced the most problems and shied me away. I have tried to drop the master folder into a newly created java-project, however I am not quite sure how to import them (especially because of the folder structure of the library).

5
  • 3
    Use Maven. It'll make your life a lot easier... Commented Oct 2, 2013 at 11:49
  • @ppeterka66 what's Maven ? Commented Oct 2, 2013 at 11:53
  • 1
    I don't think Google is down... The wiki is also full of info... Commented Oct 2, 2013 at 12:01
  • "Apache Maven is a software project management and comprehension tool." It can help you manage project dependencies (external Java libraries), and more. maven.apache.org Commented Oct 2, 2013 at 12:02
  • or you can use IvyDE ;) Commented Oct 2, 2013 at 12:56

1 Answer 1

1

right click on your project -> Build Path -> Configure Build Path... On Tab Libraries -> Add JARs... -> select your library .jar file. (must be visible within your workspace, best added to a lib-folder within your project).

otherwise install the Maven Integration for Eclipse plugin and make your project a maven managed project: Help -> Eclipse Marketplace... -> search m2e -> scroll down -> install.

Maven is a Build tool that helps your managing your dependencies. You add your dependency to a library as a short xml text in the pom.xml file and maven downloads and links the library to your project automatically. Read more about it in the documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.