Thursday, August 4, 2011

java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group

I had written an application in NetBeans and made a jar out of it. When I transferred that jar to my office computer and tried executing it there, I got the following exception.

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/swi
at classfinder.ClassFinderApp.startup(
at org.jdesktop.application.Application$
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at Source)

After comparing lots of things, I found no difference, and finally I decided to google it. And on google I found that jre version was lower in my office computer.

On my laptop, its jre 1.6 and on my office PC, its jre 1.5

When I tried executing the same jar with version 1.5 i was able to reproduce the same exception.

No comments:

Post a Comment