Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

JApplet and org.jdesktop.layout.GroupLayout Error

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I'm having some hard time trying to convert my swing app into japplet.
When i run the appletviewer it works just fine, but when i try run it on a browser it keeps saying this

java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group
at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3137)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1498)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at sun.plugin2.applet.Plugin2Manager$13.run(Plugin2Manager.java:3061)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:678)
at java.awt.EventQueue.access$000(EventQueue.java:86)
at java.awt.EventQueue$1.run(EventQueue.java:639)
at java.awt.EventQueue$1.run(EventQueue.java:637)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:648)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.layout.GroupLayout$Group
at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:252)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:250)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:180)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 20 more
Exception: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group


I've looked everywhere for this error and everyone says the same thing:
- swing-layout-1.0.jar and applet.jar must be in the same folder as index.html and must be referenced this index with the archive tag. i've done it.
- i also saw it could be a problem with netbeans using automatic layout generation so i set it up to standard java 6 code too.

But it keeps saying the same
This is an assignment for school and i really need this to work.

any suggestions?
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the APPLET tag and the file/directory layout.
 
Ana Sousa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My applet:
<applet archive="swing-layout-1.0.jar,AppletClient.jar"
code="ClienteApplet.class"
width="702" height="555">
</applet>
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So swing-layout-1.0.jar and AppletClient.jar are both in the same directory as the HTML file?

(I took the liberty of removing the code from your post, as it is not relevant to the problem at hand.)
 
Ana Sousa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes they are... i already found another way to solve my problem which is drawing everything and placing it by my self (with GridBagLayout), but it is taking some time. i would still like to see my question solved.

Thanks in advance
 
a wee bit from the empire
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic