Copy lib folder into new project

Posted on 2011-05-12
Medium Priority
Last Modified: 2012-06-21
I am really new to java and am working in Eclipse. I am working with an a existing project that I have downloaded. I have been told to copy over the lib folder and I will have access to all the classes in the project. Unfortunately don't know how to copy over the files into my new eclipse project. Please help.
Question by:leeskelton83
  • 3
  • 2
LVL 47

Expert Comment

ID: 35749294
You can write-click on your project and select Import from the drop-down menu
I think it dependes - do you want to import java source codes or are do you have
thiord party jar library? Please, elaborate

Author Comment

ID: 35749384
Thanks. I did import the lib folder which contained a jar and added it to the build path. Now though when I try to use one of the classes it says the jar has no source files..
LVL 47

Accepted Solution

for_yan earned 2000 total points
ID: 35749420
Usually jar files are imported not for the source files abut when you want to use classes (say for third party libary).

If you want to use java source files (and possibly modify them), what I would od - I would extract
them fro jar file (you can do it with simple zip program if neccassary rename  a copy of  jar to zip).
then you put your java files (ending with java into some folder)
and then

you rightt-cklick on the project, go to Import menu, select FileSystem, then browse to the folder
with your .java  files and click those which you want to import, or click all of them.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

ID: 35749433
Thanks I have it now.
LVL 47

Expert Comment

ID: 35749448
If you really want to import class library - to use classes of that library but not to modify it,

then you right-click on the project and go to Build Path --> addexternalArchive and select your jar with the classes as it is

LVL 92

Expert Comment

ID: 35751320
you don't actually need to import anything. you can just copy them directly in.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question