Integrating Java Look And Feel into Application in netbeans - java

I'm devloping a java program using netbeans
I added a look and feel to GUI application which is Synthetica AluOxide Look and Feel from this website : http://www.javasoft.de/synthetica/themes/ .
I added the Synthetica.jar and syntheticaAluOxide.jar using Add Jar/Folder dialog o my project Libraries.
and then I added this code to my class load :
import de.javasoft.plaf.synthetica.SyntheticaAluOxideLookAndFeel;
.
.
.
try
{
UIManager.setLookAndFeel(new SyntheticaAluOxideLookAndFeel());
}
catch (Exception e)
{
e.printStackTrace();
}
but when I run my application I don't get any changes, and I get this error when I click on some component in my application :
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
sun.font.FontDesignMetrics$MetricsKey.init(FontDesignMetrics.java:217)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:286)
at
sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1003)
at javax.swing.JComponent.getFontMetrics(JComponent.java:1615) at
sun.swing.MenuItemLayoutHelper.reset(MenuItemLayoutHelper.java:125)
at
javax.swing.plaf.synth.SynthMenuItemLayoutHelper.(SynthMenuItemLayoutHelper.java:119)
at
javax.swing.plaf.synth.SynthGraphicsUtils.paint(SynthGraphicsUtils.java:498)
at javax.swing.plaf.synth.SynthMenuUI.paint(SynthMenuUI.java:283) at
javax.swing.plaf.synth.SynthMenuUI.update(SynthMenuUI.java:248) at
javax.swing.JComponent.paintComponent(JComponent.java:769) at
javax.swing.JComponent.paint(JComponent.java:1045) at
javax.swing.JComponent.paintChildren(JComponent.java:878) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JComponent.paintChildren(JComponent.java:878) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JLayeredPane.paint(JLayeredPane.java:585) at
javax.swing.JComponent.paintChildren(JComponent.java:878) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JComponent.paintToOffscreen(JComponent.java:5212) at
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
at javax.swing.RepaintManager.paint(RepaintManager.java:1236) at
javax.swing.JComponent._paintImmediately(JComponent.java:5160) at
javax.swing.JComponent.paintImmediately(JComponent.java:4971) at
javax.swing.RepaintManager$3.run(RepaintManager.java:796) at
javax.swing.RepaintManager$3.run(RepaintManager.java:784) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757)
at
javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706)
at javax.swing.RepaintManager.access$1000(RepaintManager.java:62) at
javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1651)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727) at
java.awt.EventQueue.access$200(EventQueue.java:103) at
java.awt.EventQueue$3.run(EventQueue.java:688) at
java.awt.EventQueue$3.run(EventQueue.java:686) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697) at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
sun.font.FontDesignMetrics$MetricsKey.init(FontDesignMetrics.java:217)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:286)
at
sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1003)
at javax.swing.JComponent.getFontMetrics(JComponent.java:1615) at
sun.swing.MenuItemLayoutHelper.reset(MenuItemLayoutHelper.java:126)
at
javax.swing.plaf.synth.SynthMenuItemLayoutHelper.(SynthMenuItemLayoutHelper.java:119)
at
javax.swing.plaf.synth.SynthGraphicsUtils.paint(SynthGraphicsUtils.java:498)
at
javax.swing.plaf.synth.SynthMenuItemUI.paint(SynthMenuItemUI.java:283)
at
javax.swing.plaf.synth.SynthMenuItemUI.update(SynthMenuItemUI.java:247)
at javax.swing.JComponent.paintComponent(JComponent.java:769) at
javax.swing.JComponent.paint(JComponent.java:1045) at
javax.swing.JComponent.paintChildren(JComponent.java:878) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JComponent.paintToOffscreen(JComponent.java:5212) at
javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1512)
at
javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1443)
at
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:311)
at javax.swing.RepaintManager.paint(RepaintManager.java:1236) at
javax.swing.JComponent._paintImmediately(JComponent.java:5160) at
javax.swing.JComponent.paintImmediately(JComponent.java:4971) at
javax.swing.RepaintManager$3.run(RepaintManager.java:796) at
javax.swing.RepaintManager$3.run(RepaintManager.java:784) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757)
at
javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706)
at javax.swing.RepaintManager.access$1000(RepaintManager.java:62) at
javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1651)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727) at
java.awt.EventQueue.access$200(EventQueue.java:103) at
java.awt.EventQueue$3.run(EventQueue.java:688) at
java.awt.EventQueue$3.run(EventQueue.java:686) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697) at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Did you include Synthetica's core library 'synthetica.jar'
Ensure that your classpath contains all Synthetica libraries (including
Synthetica's core library 'synthetica.jar').
Enable the Synthetica Look and Feel at startup time in your application:
import de.javasoft.plaf.synthetica.SyntheticaClassyLookAndFeel;
try {
UIManager.setLookAndFeel(new SyntheticaClassyLookAndFeel());
} catch (Exception e) {
e.printStackTrace();
}

Related

how to display pdf or image file in jframe java with JWebBrowser

I want to display a file (pdf file or image file) in my frame.
I tried to work with JWebBrowser but i have got exceptions.
Here is my code :
JWebBrowser fileBrowser = new JWebBrowser();
fileBrowser.setBarsVisible(false);
fileBrowser.setStatusBarVisible(false);
jPanel2.add(fileBrowser, BorderLayout.CENTER);
//fileBrowser.navigate("file:///C:/Users/HP/Desktop/a.pdf");
fileBrowser.navigate("C:\\Users\\HP\\Desktop\\icon5.jpg");
I got this exception :
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at z.zz.createBrowser(zz.java:67)
at z.zz.<init>(zz.java:43)
at z.zz$2.run(zz.java:239)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by:java.lang.RuntimeException: java.lang.ClassNotFoundException: chrriis.dj.nativeswing.swtimpl.components.core.NativeWebBrowserStatic
at chrriis.dj.nativeswing.swtimpl.internal.NativeCoreObjectFactory.create(NativeCoreObjectFactory.java:42)
at chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.<clinit>(JWebBrowser.java:115)
... 17 more Caused by: java.lang.ClassNotFoundException: chrriis.dj.nativeswing.swtimpl.components.core.NativeWebBrowserStatic
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at chrriis.dj.nativeswing.swtimpl.internal.NativeCoreObjectFactory.create(NativeCoreObjectFactory.java:35)
... 18 more

JTabbedPane NullPointerException

I create a JTabbedPane in a JFrame using netbeans visual creator. And build a JPanel also. When I add that JPanel as a tab I got the following error. Sometimes it doesn't occur.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI.paintContentBorder(WindowsTabbedPaneUI.java:145)
at javax.swing.plaf.basic.BasicTabbedPaneUI.paint(BasicTabbedPaneUI.java:791)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.JComponent.paintComponent(JComponent.java:778)
at javax.swing.JComponent.paint(JComponent.java:1054)
at javax.swing.JComponent.paintChildren(JComponent.java:887)
at javax.swing.JComponent.paint(JComponent.java:1063)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1529)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1452)
at javax.swing.RepaintManager.paint(RepaintManager.java:1249)
at javax.swing.JComponent._paintImmediately(JComponent.java:5167)
at javax.swing.JComponent.paintImmediately(JComponent.java:4978)
at javax.swing.RepaintManager$3.run(RepaintManager.java:808)
at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
This is the code to add JPanel as a Tab.
jTabbedPane2.addTab("Swimmer",new SwimmerPanel());
What is the error?
You probably didn't initialized the JTabbedPane :
JTabbedPane jTabbedPane2 = new JTabbedPane();

Error: Unable to publish yor file in pentaho?

I am new to pentaho. I am using Pentaho Report Desiner ce-5.3.0 on Windows 7 32 bit.
When I try to publish report then login window popup then filling all fields and click on ok, it gives error.
Unable to publish your file
please try again or contact to your system administrator for assistance.
Then I have following message in error window.
Internal error occure
java.lang.RuntimeException: org.pentaho.reporting.designer.extensions.pentaho.repository.util.PublishException: The File exists and override has not been specified.
at org.pentaho.reporting.designer.extensions.pentaho.repository.actions.UpdateReservedCharsTask.run(UpdateReservedCharsTask.java:90)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
at java.awt.Dialog.show(Dialog.java:1082)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:870)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638)
at org.pentaho.reporting.designer.extensions.pentaho.repository.actions.PublishToServerTask.showErrorMessage(PublishToServerTask.java:170)
at org.pentaho.reporting.designer.extensions.pentaho.repository.actions.PublishToServerTask.run(PublishToServerTask.java:105)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: org.pentaho.reporting.designer.extensions.pentaho.repository.util.PublishException: The File exists and override has not been specified.
at org.pentaho.reporting.designer.extensions.pentaho.repository.actions.UpdateReservedCharsTask.run(UpdateReservedCharsTask.java:84)
... 35 more
The version of Report designer and bi server should be same. try that and post the result.
The error says the file already exists. You must either delete the file beforehand or check the "overwrite" checkbox.

Odd intermittent Java stacktrace since upgrading to 1.7.0_45, then program hangs doing graphics

Since going to 1.7.0_45 (and 51) my program sometimes hangs. All of it's windows work OK except for one, it's fairly complex and has around 60 JButtons, JTextFields, two JScrollbars, JLabels etc. But so do all my other windows and they work fine.
I've put debug lines to the console so I can see where the program is hanging and it seems to be during the repaint() fn. It's hanging at the line
Graphics g = getGraphics();
It has managed to draw some stuff to the screen so it's not the first call to repaint that's the issue. Looks like this: http://www.unixnerd.demon.co.uk/hungjava.jpg
I get this StackTrace. None of the lines of code are in my program. It only happens maybe one time in ten if I open and close the window. Never had the issue with Java 1.6.x. Happens on a few PCs (all Windows 7), not just mine.
Grateful for any ideas.
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at javax.swing.LayoutComparator.compare(LayoutComparator.java:116)
at javax.swing.LayoutComparator.compare(LayoutComparator.java:42)
at java.util.TimSort.countRunAndMakeAscending(TimSort.java:329)
at java.util.TimSort.sort(TimSort.java:189)
at java.util.TimSort.sort(TimSort.java:173)
at java.util.Arrays.sort(Arrays.java:659)
at java.util.Collections.sort(Collections.java:217)
at javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(SortingFocusTraversalPolicy.java:136)
at javax.swing.SortingFocusTraversalPolicy.getFocusTraversalCycle(SortingFocusTraversalPolicy.java:110)
at javax.swing.SortingFocusTraversalPolicy.getFirstComponent(SortingFocusTraversalPolicy.java:435)
at javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(LayoutFocusTraversalPolicy.java:166)
at javax.swing.SortingFocusTraversalPolicy.getDefaultComponent(SortingFocusTraversalPolicy.java:515)
at java.awt.FocusTraversalPolicy.getInitialComponent(FocusTraversalPolicy.java:169)
at java.awt.Window.getMostRecentFocusOwner(Window.java:2317)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:681)
at java.awt.Component.dispatchEventImpl(Component.java:4731)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.SequencedEvent.dispatch(SequencedEvent.java:128)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

NoClassDefFoundError: Could not initialize class com.jidesoft.swing.JideSwingUtilities

Im working on my old project at the moment using jide libraries, I used netbeans as my IDE, it works fine when I was working with it in Windows 7 a year ago.
Currently I'm using OS X Mavericks and using netbeans 7.2.1, when I try to drag the component from the palette manager i got this error.
Got anyone also encounter this?
EDIT:
Added the error log:
java.lang.NoClassDefFoundError: Could not initialize class com.jidesoft.swing.JideSwingUtilities
at com.jidesoft.swing.Searchable.installListeners(Unknown Source)
at com.jidesoft.swing.Searchable.<init>(Unknown Source)
at com.jidesoft.swing.ComboBoxSearchable.<init>(Unknown Source)
at com.jidesoft.swing.AutoCompletion.<init>(Unknown Source)
at com.jidesoft.swing.AutoCompletionComboBox.createAutoCompletion(Unknown Source)
at com.jidesoft.swing.AutoCompletionComboBox.initComponents(Unknown Source)
at com.jidesoft.swing.AutoCompletionComboBox.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at org.netbeans.modules.form.CreationFactory.createDefaultInstance(CreationFactory.java:178)
at org.netbeans.modules.form.RADComponent.createBeanInstance(RADComponent.java:252)
at org.netbeans.modules.form.RADComponent.initInstance(RADComponent.java:191)
at org.netbeans.modules.form.MetaComponentCreator.initComponentInstance(MetaComponentCreator.java:1508)
at org.netbeans.modules.form.MetaComponentCreator.createVisualComponent(MetaComponentCreator.java:975)
at org.netbeans.modules.form.MetaComponentCreator.access$300(MetaComponentCreator.java:79)
at org.netbeans.modules.form.MetaComponentCreator$2.run(MetaComponentCreator.java:286)
at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:293)
at org.openide.util.Mutex.doEventAccess(Mutex.java:1368)
at org.openide.util.Mutex.readAccess(Mutex.java:327)
at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:276)
at org.netbeans.modules.form.MetaComponentCreator.precreateVisualComponent(MetaComponentCreator.java:283)
at org.netbeans.modules.form.MetaComponentCreator.precreateVisualComponent(MetaComponentCreator.java:306)
at org.netbeans.modules.form.HandleLayer$NewComponentDrag.init(HandleLayer.java:3367)
at org.netbeans.modules.form.HandleLayer$NewComponentDrag.<init>(HandleLayer.java:3359)
at org.netbeans.modules.form.HandleLayer.mouseMoved(HandleLayer.java:2167)
at java.awt.Component.processMouseMotionEvent(Component.java:6550)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3338)
at java.awt.Component.processEvent(Component.java:6274)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4505)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
You get this error because your code is compiled against JDK1.6 but your runtime is not. In my case it was JRE1.7
You can fix this by making sure you JRE and JDK are the same versions.
For me, I changed my eclipse run config from 1.7 (default) to 1.6

Categories

Resources