NEWBIE: Eclipse jar not "jarred"

Posted on 2006-03-22
Last Modified: 2010-03-31
Dear Eclipse Experts,

I have several projects each incorporating a package.  When I use the "Export" utility (exactly the same way) to create jars and move them to another directory, some of the resulting jars are showing up with "jar" symbol which I can then look inside.  Others are showing up in the "text file" symbol, which I cannot look inside.  What's worse, one of those "text file" jars is not recognized when I try to import it elsewhere.

I'm a newbie at all this.  Any clues to what I'm doing wrong here?

Question by:BrianMc1958

    Author Comment

    Addendum: When I do the "Export" it says it finished with warnings.  When I look at the warnings, they are all simple "this variable was not used" warning.  Everything compiles OK.
    LVL 8

    Accepted Solution

    >>this variable was not used

    that means you are not using that variable in your program

    Author Comment

    I understand that.  I was just mentioning the warnings in case it might have a bearing on my larger problem.  The main problem is that other projects aren't recognizing some of my jars, and I don't know why.  I'm just guessing it might be the warnings.
    LVL 10

    Expert Comment

    Hi BrianMc1958,

    Those that are shown with the "jar" symbol will be on your buildpath.
    Others simply aren't in the buildpath.

    You can get the Jar symbol by putting any jar in the build path.
    Go to Project Properties, select Java Build Path, go to libraries tab,
    Select add jars and select and add your jar.

    Once you click ok, you should be seeing your "JAR".

    And don't worry about the not used warning. It will do no harm. It's only a way
    eclipse uses to make sure you write clean code.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    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…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    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 video teaches viewers about errors in exception handling.

    737 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

    21 Experts available now in Live!

    Get 1:1 Help Now