Page 1 of 1

SWT sample - cilck on "Basic feature" generates error

Posted: Wed Jan 05, 2011 1:24 am
by 15358202
When I run TeeChartSWT.java as java application from eclipse and click "Basic feature" option from tree view (left), I get below given error. Kindly advice me.
-------------
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(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 java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at TeeChartSWT.showSamplePane(TeeChartSWT.java:516)
at TeeChartSWT.access$4(TeeChartSWT.java:506)
at TeeChartSWT$2.widgetSelected(TeeChartSWT.java:375)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at TeeChartSWT.run(TeeChartSWT.java:72)
at TeeChartSWT.main(TeeChartSWT.java:553)

Re: SWT sample - cilck on "Basic feature" generates error

Posted: Tue Jan 18, 2011 11:18 am
by Marc
Hello,

Sorry for the delay with this reply. I tried running the example as a new project in Eclipse. I didn't see the error you describe. The steps I took were:

1. download latest version of TeeChart for Java v2
2. Open Eclipse and create new client application
3. Link source to the 'Examples\SWT\Features\src' folder
4. Add external Jar library links to Eclipse's 'org.eclipse.draw2d_3.xx','org.eclipse.jface_3.xx' and 'org.eclipse.swt_3' jar files (xx version numbering will vary)
5. Add external Jar library link to 'TeeChart.SWT.jar'.
6. Build and run project and open/run 'Basic features' example page.

Please verify the steps taken.

Regards,
Marc Meumann