Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Netbeans 6.9.1 & J2EE 6 & Shared Library Directory = Classpath errors

794081Sep 24 2010 — edited May 14 2011
Wohoo,

starting as a forum newbie....again :s

Anyway, I've run into some troubles during the setup of my very first J2EE 6 project in Netbeans. I've installed Netbeans 6.9.1 and the included Glassfish v3 server runtime. Then I've created a new J2EE 6 project using Netbeans J2EE project wizard. Said wizard has an option: "Use shared library directory". I ticked this option and specified the shared library directory to be "lib". Then I've added JAR files to it, but somehow this JARs are not added to the classpath of the dependent EJB and Web project. Any time I try to import a class from one of the EAR libraries I get the compile-time ClassNotFound error in the IDE.
I'm a seasoned Eclipse user, and only recently have switched over to Netbeans (mostly out of curiosity). In Eclipse the ${EarProject}/lib folder was automatically recognized as the EAR's lib folder, and any JAR files added to it where available for all J2EE modules in the EAR project. After consulting the integrated Netbeans help on the topic I was convinced that this should work the same in Netbeans. Can any experienced Netbeans developer assist me in this please?

PS: I'm sorry if this is the inappropriate forum category, but the old "Netbeans" category from the Sun Forums seems to have disappeared during the forum transition.

EDIT: on an unrelated note I'd like to bring to your attention that this is the first "real Java question" in this forum :D ("Wohoo this is new" posts don't count)

Edited by: 791078 on 24.09.2010 18:27
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2011
Added on Sep 24 2010
8 comments
789 views