Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GroupLayout NoClassDefFoundError

82 views
Skip to first unread message

rizwindu

unread,
Aug 9, 2007, 11:48:40 AM8/9/07
to
Hello all,

I'm trying to get an Java applet to work online. I've written the code
within Netbeans and it compiles and works fine there.

When I try and put it within a website I get the following error:

java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group
at GA_colour_change.start(GA_colour_change.java:149)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

As far as I can understand this is because Netbeans uses the
GroupLayout classes when forming the GUI. I've look around the
internet for solutions, and although I don't understand them all, as
far as I can tell, if I add the missing class files to my source it
should work. So I did this, and I now have the package
org.jdesktop.layout within my source files.

The problem is that I still get the error. If I open the .jar file I
can browse all the .class files and find the file org/jdesktop/layout/
GroupLayout$Group, so why can't it find it when it runs ?

Hope I've explained correctly and given enough information.

Cheers in advance,

Ben.

kcwong

unread,
Aug 9, 2007, 12:03:10 PM8/9/07
to
I've no experience with the GroupLayout class, so I am not sure how
the class is being loaded.

But are you building the JAR file yourself?

If yes, try using NetBeans to build the JAR for you. It should be able
to sort out all the referenced classes... after all, GroupLayout is
the class used in its UI builder, isn't it?

When NetBeans build you a working JAR, then you can look inside it to
see what's different from the version you built...

Roedy Green

unread,
Aug 9, 2007, 2:41:57 PM8/9/07
to
>NoClassDefFoundError
my least favoured exception. See
http://mindprod.com/jgloss/runerrormessages#NOCLASSDEFFOUNDERROR
Unfortunately, it has dozens of possible causes.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Roedy Green

unread,
Aug 9, 2007, 7:44:28 PM8/9/07
to
>When NetBeans build you a working JAR, then you can look inside it to
>see what's different from the version you built.
see http://mindprod.com/jgloss/products1.html#JARLOOK
to have quick peek inside your jar to find out what is in there.
0 new messages