jar file from Eclipse at the root of the jar file rather than nestedin directories

Discussion in 'Java' started by wong_powah@yahoo.ca, Mar 27, 2008.

  1. Guest

    When I generate a jar file from Eclipse v3.3.2, the classes are
    ending up at the root of the jar file rather than nested in
    directories
    according to their package.
    i.e.
    The good jar created by the jar command had the path:
    tar tvf MyJCASP.jar
    com/mycomp/crypto/Key.class
    ....

    The bad jar created by eclipse had not the path "com/mycomp/crypto":
    tar tvf MyJCASP.jar
    Key.class
    ....

    These are my steps to create a jar file in Eclipse:
    I create a new Java Project.
    I set the workspace to C:\temp\eclipse\workspace.
    My source files are at C:\win10\JavaSP\com\mycomp\crypto and
    C:\win10\JavaSP\com\mycomp\crypto\X509
    I create project "Same" and use "Import, File System, Filter Types,
    Select
    Types" menus to put the source files from
    C:\win10\JavaSP\com\mycomp\crypto and
    C:\win10\JavaSP\com\mycomp\crypto\X509 to C:\temp\eclipse\workspace
    \Same.
    I import the files starting lower down in the hierarchy (i.e. C:
    \win10\JavaSP\com\mycomp\crypto) because there are other files C:
    \win10\JavaSP\com\mycomp\cryptoext which are used to create another
    jar.

    In the Package Explorer view, the files are showing up at the root.
    i.e. I do not see "com" nor "mycomp" nor "crypto" in the "src" and its
    subdirectory.

    Please help to make eclipse v3.3.2 to put the path in the jar file.
    Thanks.
     
    , Mar 27, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. puzzlecracker
    Replies:
    2
    Views:
    5,196
    Jean-Francois Briere
    Dec 20, 2005
  2. tiewknvc9
    Replies:
    12
    Views:
    1,370
    Chris Uppal
    Feb 19, 2007
  3. Replies:
    1
    Views:
    625
    GArlington
    Aug 31, 2007
  4. Jeremy S.
    Replies:
    8
    Views:
    829
    Jeremy S.
    Jul 30, 2009
  5. Justin
    Replies:
    4
    Views:
    186
    Ben Morrow
    Oct 30, 2003
Loading...

Share This Page