users@glassfish.java.net

Re: Using GlassFish Tools Bundle For Eclipse, how 2 reference external classes?

From: Ludovic Champenois <Ludovic.Champenois_at_Sun.COM>
Date: Sun, 28 Feb 2010 20:29:01 -0800

On 2/28/10 3:27 PM, glassfish_at_javadesktop.org wrote:
> My apologies for what must seem as an extremely naive question, but I've spent the last few days trying to figure out how to avoid "root cause java.lang.NoClassDefFoundError:" errors when running a servlet that attempts to import and use classes that are part of other packages. Mind you, I included a reference to the class files in the Libraries section of the servlet project--the application seems to compile (i.e., the import statements seem to work and there are no errors raised at design time), but when running the servlet I get the aforementioned error. I am convinced this is totally a newbie configuration setup mistake. Does anyone have any quick tips for how to reference an external package or classes in a GlassFish servlet (for proof of concept only, not yet for deployment) without getting the NoClassDefFoundError? Many many many thanks in advance. -L.
> [Message sent by forum member 'sandiegoluis' (luisynigo_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=389258
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
How do you add these other classes?
Eclipse documentation is not very good.
Maybe this will help?
http://stackoverflow.com/questions/1821571/classpath-java-buld-path-eclipse-and-web-inf-lib-what-to-use-when-and-why

Ludo