Error when trying to run the demo jar

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
gschrade
Posts: 11
Joined: Tue Oct 16, 2007 6:38 pm

Error when trying to run the demo jar

Post by gschrade » Tue Oct 16, 2007 6:44 pm

I am getting the following error when trying to run the demo jar. I am entering the command stated in the readme file:

java -jar jfreechart-1.0.6-demo.jar and I am using jdk1.3.1_20

Here is the error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/lowagie/t
ext/DocumentException (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(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)

Thank you in advance.

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Tue Oct 16, 2007 10:46 pm

Hi,

the iText version you are using is compiled with a newer JDK (I assume JDK 1.4). Replace the itext-jar with a version that runs on JDK 1.3 and you shall be fine.

(I maintain a backport of iText 1.5.2 to JDK 1.2.2 for the Pentaho Reporting Project, so if you download the latest "classic" engine, you'll find a itext version in there that should work a lot better.)

But as this is just a demo, you could also simply run the demo on JDK 1.4 and then adapt what you need for your project. Chances are very high that you wont want to embed the demo-programs directly.

Have fun,
said Thomas

Locked