Page 1 of 1
Running on linux box
Posted: Wed Oct 11, 2006 5:11 am
by 9236183
We have a released version of the java teechart. I have manage to compile a java class that exports a JPEG image. This is on my WinXP machine using Eclipse and JRE 1.05.0_09 where the code runs no problem.
I was trying to run the code on my debian server which has JRE 1.05.0_07 and my code running from a JAR file.
The code runs but it never seems to return from the code :- graph_.getExport().getImage().getJPEG().save(outputFileName_);
I can see that the jpeg file is created but it has no size.
Any idea what could be going wrong ?
Posted: Wed Oct 11, 2006 6:40 am
by 9236183
when I run the jar file from the JRE on the debian box in verbose mode the graph_.getExport().getImage().getJPEG().save(outputFileName_) stops at the following location....
[Loaded sun.awt.SunHints from shared objects file]
[Loaded java.awt.RenderingHints$Key from shared objects file]
[Loaded sun.awt.SunHints$Key from shared objects file]
[Loaded sun.awt.SunHints$Value from shared objects file]
[Loaded java.awt.TexturePaint from /usr/lib/j2re1.5-sun/lib/rt.jar]
[Loaded java.awt.image.PixelGrabber from /usr/lib/j2re1.5-sun/lib/rt.jar]
It seems the PixelGrabber code is in an endless loop, is this my JRE problem or a problem with the TeeChart.Swing.jre ?
Posted: Wed Oct 11, 2006 6:43 am
by 9236183
Just added a few more lines from the verbose output so you can see which part of teechart is being called...
[Loaded com.steema.teechart.events.ChartEvent from file:/usr/lib/j2re1.5-sun/lib/ext/TeeChart.Swing.jar]
[Loaded com.steema.teechart.events.ChartDrawEvent from file:/usr/lib/j2re1.5-sun/lib/ext/TeeChart.Swing.jar]
[Loaded java.awt.RenderingHints from shared objects file]
[Loaded sun.awt.SunHints from shared objects file]
[Loaded java.awt.RenderingHints$Key from shared objects file]
[Loaded sun.awt.SunHints$Key from shared objects file]
[Loaded sun.awt.SunHints$Value from shared objects file]
[Loaded java.awt.TexturePaint from /usr/lib/j2re1.5-sun/lib/rt.jar]
[Loaded java.awt.image.PixelGrabber from /usr/lib/j2re1.5-sun/lib/rt.jar
Posted: Thu Oct 12, 2006 3:47 am
by 9236183
I just tried compiling the code with the demo TeeChart.swing.jar when this is run on the debian box an image is output i.e. it does return from the save jpg function call.
The only problem is the the background of the chart is all black which I guess was done as security for the demo release.
My code simply load an image into the background and places some annotation text over the image and then tried to export the chart as a jpg.
Can someone confirm if this is a bug ?
Is there a simple way of compiling the source code into the jar to see if this fixes the problem ?
Posted: Thu Oct 12, 2006 10:47 pm
by 9236183
Seems I have figured out what the problem was, seems the loadImage() was failing to load the background image due to the code running on the debian machine not handling a uppercase letter in the path.
Not loading the image seems to cause it to thrash in a loop.