Copy lib folder into new project

Posted on 2011-05-12
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
    LVL 47

    Expert Comment

    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
    LVL 3

    Author Comment

    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

    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.
    LVL 3

    Author Comment

    Thanks I have it now.
    LVL 47

    Expert Comment

    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

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    Title # Comments Views Activity
    withoutTen challenge 14 68
    JKS to store upstart data 2 51
    maven java path setting 5 31
    What is the latest versions eclipse neon 2 55
    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now