Hi, when I try to use chartComposite I get the error
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/events/PaintListener
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at Main.main(Main.java:106)
Anybody have any ideas on what the problem could be? Thanks!
java.lang.NoClassDefFoundError: when using chartComposite
-
- Posts: 4
- Joined: Thu May 14, 2009 6:29 am
-
- Posts: 4
- Joined: Thu May 14, 2009 6:29 am
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: java.lang.NoClassDefFoundError: when using chartComposite
Most likely the SWT version. Which version are you using?
I haven't looked at the SWT code in a while, since I don't use SWT myself. But I'm hoping to go through it again soon, ensure it is in a reasonably sane state, and document it better.
I haven't looked at the SWT code in a while, since I don't use SWT myself. But I'm hoping to go through it again soon, ensure it is in a reasonably sane state, and document it better.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 4
- Joined: Thu May 14, 2009 6:29 am
Re: java.lang.NoClassDefFoundError: when using chartComposite
I am using SWT 3.4 Final Release - 19 June 2008, so it is the newest version other than the non-stable version. Could it have anything to do with the fact that I added it to my project build path as a required project in eclipse by selecting the zip file I received when downloading SWT? Thanks.
Re: java.lang.NoClassDefFoundError: when using chartComposite
You can add the required dependency (for the PaintListener class you have to add 'org.swt.eclipse') inside the manifest file for the JFreeChart plugin in your RCP application and this error should go away.
Ashwati Sadanandan
Ashwati Sadanandan