Using JFreeChart with Webstart? SOLVED (rather, WORKAROUND)

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
owagner

Using JFreeChart with Webstart? SOLVED (rather, WORKAROUND)

Post by owagner » Sun Jul 07, 2002 7:24 pm

Ok, I managed to identify the actual problem described in the mentioned thread, and found a workaround:

a) The problems stems from the fact that JDK 1.4(.0|1) will nuke if you try to load a progressive JPEG from a signed (!) jar file. This will most likely manifest with Webstart distributed files.

b) JFreeChart loads "gorilla.jpg" upon the first instantiation of a JFreeChart object

c) gorilla.jpg is -- you guessed it -- a progressive JPEG. Bang.

The workaround is to modify gorilla.jpg so that it is a non-progressive JPEG. Load it with the image editor of your choice, save it and make sure you set the proper options to make sure the JPEG is NOT progressive.

David, may I additionally suggest that you make the loading of the JFreeChart info object more lazy? I don't think the image is ever used during the normal course of operation, and only wastes memory...

Olli

David Gilbert

Re: Using JFreeChart with Webstart? SOLVED (rather, WORKARO

Post by David Gilbert » Sun Jul 07, 2002 8:54 pm

Hi Olli,

Thanks for your hard work on this...I will change the code to load the gorilla.jpg only when it is first accessed.

Regards,

DG.

Locked