netbeans doesn't create lib directory under dist

Discussion in 'Java' started by jadrian@wi.rr.com, Oct 8, 2007.

  1. Guest

    I'm trying to use netbeans 5.5 to create an executable on windows.
    The app depends on on ibm db2 jars as well as the log4j jar. I can
    build and run the app from the ide but when I try to run it standalone
    it complains that it can't load the log4j Logger. Specifically when
    it builds it doesn't create a lib directory under dist.

    I've gone through the documentation; it says you need to specify a
    main class. I've done that, I have the libraries listed under the
    Libraries directory in the ide and tried about a hundred things but no
    luck.

    Any thoughts?

    Thanks
     
    , Oct 8, 2007
    #1
    1. Advertising

  2. Lew Guest

    wrote:
    > I'm trying to use netbeans 5.5 to create an executable on windows.
    > The app depends on on ibm db2 jars as well as the log4j jar. I can
    > build and run the app from the ide but when I try to run it standalone
    > it complains that it can't load the log4j Logger. Specifically when
    > it builds it doesn't create a lib directory under dist.
    >
    > I've gone through the documentation; it says you need to specify a
    > main class. I've done that, I have the libraries listed under the
    > Libraries directory in the ide and tried about a hundred things but no
    > luck.


    Leaving aside the "executable on windows [sic]" question, even a "lib
    directory under dist" isn't an automatic way to include libraries. The
    distribution JAR must include a class path in its manifest, or the "java"
    command that executes the main class must specify a class path that includes
    your library JARs.

    --
    Lew
     
    Lew, Oct 8, 2007
    #2
    1. Advertising

  3. Mark Space Guest

    wrote:
    > I'm trying to use netbeans 5.5 to create an executable on windows.
    > The app depends on on ibm db2 jars as well as the log4j jar. I can
    > build and run the app from the ide but when I try to run it standalone
    > it complains that it can't load the log4j Logger. Specifically when



    Just curious: is this a web application? I.e., are you actually
    distributing a .jar, or a .war?
     
    Mark Space, Oct 8, 2007
    #3
  4. Guest

    On Oct 8, 2:39 pm, Mark Space <> wrote:
    > wrote:
    > > I'm trying to use netbeans 5.5 to create an executable on windows.
    > > The app depends on on ibm db2 jars as well as the log4j jar. I can
    > > build and run the app from the ide but when I try to run it standalone
    > > it complains that it can't load the log4j Logger. Specifically when

    >
    > Just curious: is this a web application? I.e., are you actually
    > distributing a .jar, or a .war?


    Not a web app, just a .jar.

    It's not complicated and I originally coded it on a unix box without
    any ide. Under those circumstances I could just keep appending jars
    and directories to my CLASSPATH environment variable. That's why I
    said "... create an executable on windows." It works fine on unix but
    NetBeans ties pieces together according to a different set of rules.
    I think the rules are well understood by people who are used to using
    an ide but not if you're used to hand-cobbling it together.

    The log4j jar file is on the environment CLASSPATH variable in the
    command window I run the packaged jar file in so I assume that
    NetBeans communicates the CLASSPATH some other way. NetBeans
    documentation says that it will create a lib directory under the dist
    directory but it doesn't. I tried manually putting in the classpath
    in the manifest file but no luck.

    I think the solution is in front of my nose but I can't see it.
     
    , Oct 8, 2007
    #4
  5. Lew Guest

    wrote:
    > Not a web app, just a .jar.
    >
    > It's not complicated and I originally coded it on a unix box without
    > any ide. Under those circumstances I could just keep appending jars
    > and directories to my CLASSPATH environment variable. That's why I
    > said "... create an executable on windows." It works fine on unix but
    > NetBeans ties pieces together according to a different set of rules.
    > I think the rules are well understood by people who are used to using
    > an ide but not if you're used to hand-cobbling it together.
    >
    > The log4j jar file is on the environment CLASSPATH variable in the
    > command window I run the packaged jar file in so I assume that
    > NetBeans communicates the CLASSPATH some other way. NetBeans
    > documentation says that it will create a lib directory under the dist
    > directory but it doesn't. I tried manually putting in the classpath
    > in the manifest file but no luck.


    How exactly are you running the program? If it's via "java -jar your.jar"
    then the classpath is ignored, and only the Class-Path: in the manifest prevails.

    What is your manifest's Class-Path: entry?

    You refer to these things, but you do not reveal them. How can we help you?

    --
    Lew
     
    Lew, Oct 8, 2007
    #5
  6. Guest

    On Oct 8, 5:03 pm, Lew <> wrote:
    > wrote:
    > > Not a web app, just a .jar.

    >
    > > It's not complicated and I originally coded it on a unix box without
    > > any ide. Under those circumstances I could just keep appending jars
    > > and directories to my CLASSPATH environment variable. That's why I
    > > said "... create an executable on windows." It works fine on unix but
    > > NetBeans ties pieces together according to a different set of rules.
    > > I think the rules are well understood by people who are used to using
    > > an ide but not if you're used to hand-cobbling it together.

    >
    > > The log4j jar file is on the environment CLASSPATH variable in the
    > > command window I run the packaged jar file in so I assume that
    > > NetBeans communicates the CLASSPATH some other way. NetBeans
    > > documentation says that it will create a lib directory under the dist
    > > directory but it doesn't. I tried manually putting in the classpath
    > > in the manifest file but no luck.

    >
    > How exactly are you running the program? If it's via "java -jar your.jar"
    > then the classpath is ignored, and only the Class-Path: in the manifest prevails.
    >
    > What is your manifest's Class-Path: entry?
    >
    > You refer to these things, but you do not reveal them. How can we help you?
    >
    > --
    > Lew


    Does your netbeans project by any chance have an ant script
    (build.xml) associated with it? If so, check for your classpath
    there.
     
    , Oct 8, 2007
    #6
  7. Guest

    On Oct 8, 4:03 pm, Lew <> wrote:
    > wrote:
    > > Not a web app, just a .jar.

    >
    > > It's not complicated and I originally coded it on a unix box without
    > > any ide. Under those circumstances I could just keep appending jars
    > > and directories to my CLASSPATH environment variable. That's why I
    > > said "... create an executable on windows." It works fine on unix but
    > > NetBeans ties pieces together according to a different set of rules.
    > > I think the rules are well understood by people who are used to using
    > > an ide but not if you're used to hand-cobbling it together.

    >
    > > The log4j jar file is on the environment CLASSPATH variable in the
    > > command window I run the packaged jar file in so I assume that
    > > NetBeans communicates the CLASSPATH some other way. NetBeans
    > > documentation says that it will create a lib directory under the dist
    > > directory but it doesn't. I tried manually putting in the classpath
    > > in the manifest file but no luck.

    >
    > How exactly are you running the program? If it's via "java -jar your.jar"
    > then the classpath is ignored, and only the Class-Path: in the manifest prevails.
    >
    > What is your manifest's Class-Path: entry?
    >
    > You refer to these things, but you do not reveal them. How can we help you?
    >
    > --
    > Lew


    Sorry about that, the manifest file (now):

    Manifest-Version: 1.0

    Name: ConnMetrics
    Main-Class: ConnMetrics
    Class-Path: C:\projects\CONNSTAT\log4j-1.2.15.jar C:\projects\CONNSTAT
    \connMetric\ConnMetrics

    .... and, at some point, netbeans DID create a lib directory, possibly
    after I added the Class-Path: line after your last response?

    Now I have another path problem. It can't find the jdbc.properties
    file. Last Friday I ran this from netbeans and it and two other
    properties files were found. Any thoughts on how it finds resource
    bundles?

    I'm developing it under C:\projects\CONNSTAT\connMetric\ConnMetrics
    directory, which is both the working directory and the project folder.

    I'm trying to run it under C:\projects\CONNSTAT\testRun\dist which has
    the ConnMetrics.jar and a lib\ subdirectory.

    I put the jdbc.properties file in C:\projects\CONNSTAT\testRun\dist
    just to see if it would find it but it didn't.

    Generally I'd like some understanding of how a jar file created in a
    dist\ directory in netbeans looks for jars, classes, resource bundles,
    etc.

    If you need some configuration information like the manifest please
    let me know. I just don't want to clutter the post with a lot of
    useless stuff and I have to be careful to not put out anything that
    could be construed as confidential corporate data.

    Thanks,

    Jeff
     
    , Oct 8, 2007
    #7
  8. Lew Guest

    wrote:
    > I think the solution is in front of my nose but I can't see it.


    I'm running NetBeans 6 (beta) (with Java 6u3) but I tried the process anyway;
    it really hasn't changed.

    First, I reviewed NetBeans's documentation on how to deploy an application.
    <http://www.netbeans.org/kb/articles/javase-deploy.html>
    in particular,
    <http://www.netbeans.org/kb/articles/javase-deploy.html#Exercise_1>

    To a project called "testit", I added the log4j library as a NetBeans library
    (menu "_T_ools / _L_ibraries"). Did a project "Clean and Build". This
    created a dist/ subdirectory within my project directory.

    > $ ls dist
    > lib README.TXT testit.jar
    > $ ls dist/lib
    > log4j-1.2.14.jar


    I think the key was the "Clean" part of "Clean and Build". Doing just a
    "Build" (it was a pre-existing project) didn't create either JAR file.

    Bear in mind that these JARs must deploy together, in the same relative
    directory relationship.

    Then I examined testit.jar.

    > $ cd dist
    > $ jar tf testit.jar
    > META-INF/
    > META-INF/MANIFEST.MF
    > testit/
    > log4j.properties
    > testit/PolyMatrix.class


    Contents of META-INF/MANIFEST.MF:
    > $ jar xf testit.jar META-INF/MANIFEST.MF
    > $ cat META-INF/MANIFEST.MF
    > Manifest-Version: 1.0
    > Ant-Version: Apache Ant 1.7.0
    > Created-By: 1.6.0_03-b05 (Sun Microsystems Inc.)
    > Main-Class: testit.PolyMatrix
    > Class-Path: lib/log4j-1.2.14.jar
    > X-COMMENT: Main-Class will be added automatically by build


    Runs great:
    > $ java -jar testit.jar
    >
    > 2007-10-08 17:53:55,708 ERROR testit.PolyMatrix : Didn't initialize entire matrix [main ]
    > java.lang.NullPointerException
    > at testit.PolyMatrix.main(PolyMatrix.java:81)


    I have no CLASSPATH envar defined, not that it would matter.

    Code snippet to show the log4j call:
    > try
    > {
    > mat [0] [0] [0] = BigInteger.ZERO; // line 81
    > }
    > catch ( NullPointerException exc )
    > {
    > logger.error( "Didn't initialize entire matrix", exc );
    > }


    Only the outer dimensions of 'mat' were initialized, causing a reference to
    the third dimension to throw the NPE. The NPE was intentional, to show use of
    log4j.

    --
    Lew
     
    Lew, Oct 8, 2007
    #8
  9. Lew Guest

    wrote:
    > ... the manifest file (now):
    >
    > Manifest-Version: 1.0
    >
    > Name: ConnMetrics
    > Main-Class: ConnMetrics
    > Class-Path: C:\projects\CONNSTAT\log4j-1.2.15.jar C:\projects\CONNSTAT
    > \connMetric\ConnMetrics


    This is not a workable Class-Path: entry. You should use relative paths.
    This is done automatically by NetBeans in its build. Manifest paths use
    forward slashes.

    Is the log4j JAR actually in that directory you specify?

    Will it be in that same directory everywhere your app is deployed?

    What is the purpose for the folder that you list ("**/ConnMetrics")?

    > Generally I'd like some understanding of how a jar [sic] file created in a
    > dist\ [sic] directory in netbeans [sic] looks for jars, classes, resource bundles,
    > etc.


    Have you studied everything on
    <http://java.sun.com/javase/6/docs/technotes/guides/jar/index.html>
    ?

    Reading the instructions is an awfully useful exercise.

    BTW, resource bundles are found through the class path.

    > If you need some configuration information like the manifest please
    > let me know. I just don't want to clutter the post with a lot of
    > useless stuff and I have to be careful to not put out anything that
    > could be construed as confidential corporate data.


    Since your problem is in the manifest, it's hardly "useless stuff".

    --
    Lew
     
    Lew, Oct 8, 2007
    #9
  10. Guest

    Finally got it.

    Thanks to Lew and the two Marks.

    The fundamental issue has to do with how to tell NetBeans to include
    libraries for distribution. Lew is correct that that is derived from
    META-INF/MANIFEST.MF which is bundled in the distributable jar file
    but NetBeans is supposed to build that and it was not doing so.

    The problem was that I was trying to add the required jar files by
    right-clicking the project node and selecting "Properties", which
    brings up the project properties window. In the properties window
    there is a Libraries selection which brings up a tabbed window. The
    tabs are "Compile", "Run", "Compile Tests" and "Run Tests". For each
    of those there are buttons to "Add Project...", "Add Library", and
    "Add JAR/Folder" and it was here that I made my mistake by using the
    "Add JAR/Folder" option to try to bring the external jar files into
    the project.

    I should have clicked the "Add Library" button (or, from the Projects
    pane, right-clicked "Libraries" and selected "Add Library"). The
    window that comes up for "Add Library" lists standard libraries not
    part of the JDK (this is taken from the site Lew recommended
    http://www.netbeans.org/kb/articles/javase-deploy.html). In this
    window you can choose "Manage Libraries..." which brings up a window
    that has a button "New Library". Create a new library, say,
    "MyLibrary", click "Add JAR/Folder" and include the jar files you
    need.

    For the resource bundles I just included them in the "src" directory.
    I first deleted the existing project and re-created it as described
    above and the dist/lib directory was created, the META-INF/MANIFEST.MF
    file it created had everything in it that was needed and the app ran
    fine when the dist directory was moved elsewhere.

    You raised many very good points, Lew, which I will keep around for
    future reference. In this case the issue primarily was my lack of
    familiarity with the NetBeans ide aggravated by the many gaps in my
    knowledge of the java programming paradigm.

    Thanks again for everyone's help.

    Jeff
     
    , Oct 9, 2007
    #10
  11. Ron Guest

    I had the exact same problem. When I first started working with
    Netbeans, my lib directory in the dist directory was created and
    populated correctly. I did not have to add my libraries with the
    library manager. I just added them as Netbeans projects. Everything
    was great.

    But then it stopped creating the lib directory. :(

    I tried alot of stuff to get that lib directory back. I double and
    triple checked that my project files (everything in nbproject) had not
    changed. I tried all the advice in this thread, including adding my
    jar files to the libraries governed by the Library Manager. Nothing
    worked.

    Then I became suspicious that one of the updates applied by Update
    Center must have broken this functionality. I re-installed Netbeans
    from scratch, loaded my projects and re-built, and now my lib
    directory was back!

    I will slowly apply the updates one at a time, and see if I can find
    the culprit.

    On Oct 8, 1:25 pm, wrote:
    > I'm trying to usenetbeans5.5 to create an executable on windows.
    > The app depends on on ibm db2 jars as well as the log4j jar. I can
    > build and run the app from the ide but when I try to run it standalone
    > it complains that it can't load the log4j Logger. Specifically when
    > it builds it doesn't create alibdirectory underdist.
    >
    > I've gone through the documentation; it says you need to specify a
    > main class. I've done that, I have the libraries listed under the
    > Libraries directory in the ide and tried about a hundred things but no
    > luck.
    >
    > Any thoughts?
    >
    > Thanks
     
    Ron, Nov 1, 2007
    #11
  12. Lew Guest

    Ron wrote:
    > I had the exact same problem. When I first started working with
    > Netbeans, my lib directory in the dist directory was created and
    > populated correctly. I did not have to add my libraries with the
    > library manager. I just added them as Netbeans projects. Everything
    > was great.
    >
    > But then it stopped creating the lib directory. :(
    >
    > I tried alot of stuff to get that lib directory back. I double and
    > triple checked that my project files (everything in nbproject) had not
    > changed. I tried all the advice in this thread, including adding my
    > jar files to the libraries governed by the Library Manager. Nothing
    > worked.
    >
    > Then I became suspicious that one of the updates applied by Update
    > Center must have broken this functionality. I re-installed Netbeans
    > from scratch, loaded my projects and re-built, and now my lib
    > directory was back!
    >
    > I will slowly apply the updates one at a time, and see if I can find
    > the culprit.


    Please do not top-post. Use trim-and-inline posting.

    NetBeans isn't supposed to put a lib directory under dist/. It goes in
    build/. dist/ is where the JAR / WAR / EAR files go.

    --
    Lew
     
    Lew, Nov 1, 2007
    #12
  13. Nigel Wade Guest

    Lew wrote:

    >
    > NetBeans isn't supposed to put a lib directory under dist/. It goes in
    > build/. dist/ is where the JAR / WAR / EAR files go.
    >


    The dist/ directory of an application is supposed to be self-contained so that
    the contents of dist/ can be packaged and shipped as a single entity. dist/
    contains the application jar, and dist/lib any jars on which the main jar
    depends. The manifest of the application's jar will include lib/whatever.jar in
    the classpath for each dependent jar.

    --
    Nigel Wade, System Administrator, Space Plasma Physics Group,
    University of Leicester, Leicester, LE1 7RH, UK
    E-mail :
    Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
     
    Nigel Wade, Nov 1, 2007
    #13
  14. Lew Guest

    Lew wrote:
    >
    >> NetBeans isn't supposed to put a lib directory under dist/. It goes in
    >> build/. dist/ is where the JAR / WAR / EAR files go.


    Nigel Wade wrote:
    > The dist/ directory of an application is supposed to be self-contained so that
    > the contents of dist/ can be packaged and shipped as a single entity. dist/
    > contains the application jar, and dist/lib any jars on which the main jar
    > depends. The manifest of the application's jar will include lib/whatever.jar in
    > the classpath for each dependent jar.


    By golly, you're right. It sure looks like a NetBeans bug to me.

    I had gotten so used to web apps that I forgot to double-check application builds.

    --
    Lew
     
    Lew, Nov 1, 2007
    #14
  15. Ron Guest

    On Nov 1, 8:59 am, Lew <> wrote:
    > Ron wrote:
    > > I had the exact same problem. When I first started working with
    > > Netbeans, my lib directory in the dist directory was created and
    > > populated correctly. I did not have to add my libraries with the
    > > library manager. I just added them as Netbeans projects. Everything
    > > was great.

    >
    > > But then it stopped creating the lib directory. :(

    >
    > > I tried alot of stuff to get that lib directory back. I double and
    > > triple checked that my project files (everything in nbproject) had not
    > > changed. I tried all the advice in this thread, including adding my
    > > jar files to the libraries governed by the Library Manager. Nothing
    > > worked.

    >
    > > Then I became suspicious that one of the updates applied by Update
    > > Center must have broken this functionality. I re-installed Netbeans
    > > from scratch, loaded my projects and re-built, and now my lib
    > > directory was back!

    >
    > > I will slowly apply the updates one at a time, and see if I can find
    > > the culprit.

    >
    > Please do not top-post. Use trim-and-inline posting.
    >
    > NetBeans isn't supposed to put a lib directory under dist/. It goes in
    > build/. dist/ is where the JAR / WAR / EAR files go.
    >
    > --
    > Lew- Hide quoted text -
    >
    > - Show quoted text -


    Not sure if you have read this page:
    http://www.netbeans.org/kb/articles/javase-deploy.html

    In it, it says:
    "If you have specified any libraries for the project (in addition to
    the JDK), a lib folder is created in the dist folder. The libraries
    are copied into dist/lib."
     
    Ron, Nov 1, 2007
    #15
  16. Nigel Wade Guest

    Lew wrote:

    > Lew wrote:
    >>
    >>> NetBeans isn't supposed to put a lib directory under dist/. It goes in
    >>> build/. dist/ is where the JAR / WAR / EAR files go.

    >
    > Nigel Wade wrote:
    >> The dist/ directory of an application is supposed to be self-contained so

    that
    >> the contents of dist/ can be packaged and shipped as a single entity. dist/
    >> contains the application jar, and dist/lib any jars on which the main jar
    >> depends. The manifest of the application's jar will include lib/whatever.jar

    in
    >> the classpath for each dependent jar.

    >
    > By golly, you're right. It sure looks like a NetBeans bug to me.
    >
    > I had gotten so used to web apps that I forgot to double-check application

    builds.
    >


    It has its advantages and disadvantages. It is convenient that the application
    is self-contained and means the application can be easily tested outside of
    NetBeans. But if you are building several applications all of which have
    similar dependencies then you end up with a huge amount of duplication.

    --
    Nigel Wade, System Administrator, Space Plasma Physics Group,
    University of Leicester, Leicester, LE1 7RH, UK
    E-mail :
    Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
     
    Nigel Wade, Nov 1, 2007
    #16
  17. Lew wrote:

    > Lew wrote:
    > >
    > >> NetBeans isn't supposed to put a lib directory under dist/. It goes in
    > >> build/. dist/ is where the JAR / WAR / EAR files go.

    >
    > Nigel Wade wrote:
    > > The dist/ directory of an application is supposed to be self-contained so that
    > > the contents of dist/ can be packaged and shipped as a single entity. dist/
    > > contains the application jar, and dist/lib any jars on which the main jar
    > > depends. The manifest of the application's jar will include lib/whatever.jar in
    > > the classpath for each dependent jar.

    >
    > By golly, you're right. It sure looks like a NetBeans bug to me.
    >

    No actually, it says if you add a folder (instead of a jar) to a
    library, it won't put out your /lib anymore. Says so very
    inconspicuously somewhere in the help.

    Had the same problem, removing the "just paths" parts (i.e.
    "c:\javalibs\bla") from my own created libraries solved it.

    > I had gotten so used to web apps that I forgot to double-check application builds.
    >
    >


    --
    Sabine Dinis Blochberger

    Op3racional
    www.op3racional.eu
     
    Sabine Dinis Blochberger, Nov 5, 2007
    #17
  18. Lew Guest

    Sabine Dinis Blochberger wrote:
    > Lew wrote:
    >
    >> Lew wrote:
    >>>> NetBeans isn't supposed to put a lib directory under dist/. It goes in
    >>>> build/. dist/ is where the JAR / WAR / EAR files go.

    >> Nigel Wade wrote:
    >>> The dist/ directory of an application is supposed to be self-contained so that
    >>> the contents of dist/ can be packaged and shipped as a single entity. dist/
    >>> contains the application jar, and dist/lib any jars on which the main jar
    >>> depends. The manifest of the application's jar will include lib/whatever.jar in
    >>> the classpath for each dependent jar.

    >> By golly, you're right. It sure looks like a NetBeans bug to me.
    >>

    > No actually, it says if you add a folder (instead of a jar) to a
    > library, it won't put out your /lib anymore. Says so very
    > inconspicuously somewhere in the help.


    Funny, when I went to duplicate the problem I only added JARs, not folders, to
    the libraries and it still failed to generate a lib/.

    Unless they are also suppressing lib/ when you add Javadoc and source folders
    to the library.

    --
    Lew
     
    Lew, Nov 5, 2007
    #18
  19. Ron Guest

    On Nov 5, 9:51 am, Lew <> wrote:
    > Sabine Dinis Blochberger wrote:
    > > Lew wrote:

    >
    > >> Lew wrote:
    > >>>> NetBeans isn't supposed to put a lib directory under dist/. It goes in
    > >>>> build/. dist/ is where the JAR / WAR / EAR files go.
    > >> Nigel Wade wrote:
    > >>> The dist/ directory of an application is supposed to be self-contained so that
    > >>> the contents of dist/ can be packaged and shipped as a single entity. dist/
    > >>> contains the application jar, and dist/lib any jars on which the main jar
    > >>> depends. The manifest of the application's jar will include lib/whatever.jar in
    > >>> the classpath for each dependent jar.
    > >> By golly, you're right. It sure looks like a NetBeans bug to me.

    >
    > > No actually, it says if you add a folder (instead of a jar) to a
    > > library, it won't put out your /lib anymore. Says so very
    > > inconspicuously somewhere in the help.

    >
    > Funny, when I went to duplicate the problem I only added JARs, not folders, to
    > the libraries and it still failed to generate a lib/.
    >
    > Unless they are also suppressing lib/ when you add Javadoc and source folders
    > to the library.
    >
    > --
    > Lew- Hide quoted text -
    >
    > - Show quoted text -


    I had the same results. No matter how I added the required libraries
    (as a project, as a .jar, as a library), it would not put those
    dependencies in the lib folder.

    If this is not a bug, if this is an intended change to behaviour, can
    someone publish the new instructions for producing a distribution for
    an application? I could not find any information about this change in
    the help or on the web.
     
    Ron, Nov 5, 2007
    #19
  20. Lew wrote:

    > Sabine Dinis Blochberger wrote:
    > > Lew wrote:
    > >
    > >> Lew wrote:
    > >>>> NetBeans isn't supposed to put a lib directory under dist/. It goes in
    > >>>> build/. dist/ is where the JAR / WAR / EAR files go.
    > >> Nigel Wade wrote:
    > >>> The dist/ directory of an application is supposed to be self-contained so that
    > >>> the contents of dist/ can be packaged and shipped as a single entity. dist/
    > >>> contains the application jar, and dist/lib any jars on which the main jar
    > >>> depends. The manifest of the application's jar will include lib/whatever.jar in
    > >>> the classpath for each dependent jar.
    > >> By golly, you're right. It sure looks like a NetBeans bug to me.
    > >>

    > > No actually, it says if you add a folder (instead of a jar) to a
    > > library, it won't put out your /lib anymore. Says so very
    > > inconspicuously somewhere in the help.

    >
    > Funny, when I went to duplicate the problem I only added JARs, not folders, to
    > the libraries and it still failed to generate a lib/.
    >
    > Unless they are also suppressing lib/ when you add Javadoc and source folders
    > to the library.
    >

    Hm, I don't have any with sources added, but with Javadoc paths. In the
    Classpath part, only have jar files. And if *any* of your used libraries
    contains a path there, the /lib isn't created apparently...

    Found the passage in the Netbeans (5.5.1) help:

    "Preparing a JAR file for Deployment Outside the IDE

    * If you added a folder of classes or resources to the classpath (as
    opposed to a JAR file or project), none of the classpath elements are
    copied to the dist folder."
    --
    Sabine Dinis Blochberger

    Op3racional
    www.op3racional.eu
     
    Sabine Dinis Blochberger, Nov 6, 2007
    #20
    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. MS
    Replies:
    3
    Views:
    1,556
  2. Steve Pinard

    sort() doesn't work on dist.keys() ?

    Steve Pinard, Jul 10, 2003, in forum: Python
    Replies:
    5
    Views:
    454
    Greg Fortune
    Jul 11, 2003
  3. Replies:
    3
    Views:
    576
    Larry I Smith
    Mar 9, 2006
  4. Kenjis Kaan
    Replies:
    4
    Views:
    124
    Randy Kobes
    Jun 29, 2003
  5. Jason Friedman
    Replies:
    0
    Views:
    147
    Jason Friedman
    Dec 27, 2012
Loading...

Share This Page