This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 47799 - nested dependencies not added to runtime classpath
Summary: nested dependencies not added to runtime classpath
Status: CLOSED DUPLICATE of bug 47507
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-24 14:45 UTC by athompson
Modified: 2006-03-24 09:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description athompson 2004-08-24 14:45:43 UTC
1. create project 'a' and add class 'A':

package a;
public class A {
    public static void main(String[] args) {
        System.out.println("a!");
    }
}

2. create project 'b' and add 'a' as dependency
3. add class 'B':

package b;
public class B {
    public static void main(String[] args) {
        System.out.println("b!");
        a.A.main(args);
    }
}

3. create project 'c' and add 'b' as dependency
4. add class 'C':

package c;
public class C {
    public static void main(String[] args) {
        System.out.println("c!");
        b.B.main(args);
    }
}

5! try to run project 'c'. all compile ok but a
java.lang.NoClassDefFoundError is issued for
'a/A', because it was not added to the classpath.

i imagine for web applications, the nested
dependencies are not added to the lib directory,
although i haven't tested that.

if this is as designed, it needs to be reworded in
the project properties to state this more clearly
(i also disagree with it, especially because of
the webapp reason above).
Comment 1 Jesse Glick 2004-08-24 17:24:43 UTC
As designed, at least for 4.0; will adjust UI to hopefully make that
clearer. Just add A to C's r/t classpath explicitly (similarly for web
apps). A structured project type like Java Web Start would probably
not require this kind of manual adjustment since it would have a
first-class notion of containment.

*** This issue has been marked as a duplicate of 47507 ***
Comment 2 Marian Mirilovic 2005-07-12 10:17:04 UTC
closed