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.
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).
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 ***
closed