Pie on Linux without running X11

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Tribut
Newbie
Newbie
Posts: 3
Joined: Tue Jan 12, 2010 12:00 am
Contact:

Pie on Linux without running X11

Post by Tribut » Tue May 24, 2011 9:11 am

I running TeeChart on Linux without running X11. Wenn i use PieSeries i get this Exception.

Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:261)
at com.steema.teechart.drawing.Graphics3D.getScreenWidth(Graphics3D.java:301)
at com.steema.teechart.styles.Circular.calcCircledRatio(Circular.java:151)
at com.steema.teechart.styles.Circular.doBeforeDrawValues(Circular.java:200)
at com.steema.teechart.styles.Series.drawSeries(Series.java:2267)
at com.steema.teechart.Chart.internalDraw(Chart.java:756)
at com.steema.teechart.Chart.paint(Chart.java:2031)
at com.steema.teechart.exports.ImageExport.image(ImageExport.java:107)
at com.steema.teechart.Chart.image(Chart.java:310)
at com.steema.teechart.exports.ImageExportFormat.save(ImageExportFormat.java:110)
at org.tribut.targettbsev.TbSevOhneChartImgHandler.onRender(TbSevOhneChartImgHandler.java:100)

Thanks!

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Pie on Linux without running X11

Post by Yeray » Wed May 25, 2011 9:15 am

Hello,

I've been able to run the features demo in an Ubuntu 11.04 system. But you are probably trying to create your chart in a system without loading a GUI, probably to save it to disk to be streamed to a browser or something like that.
I'm not a linux expert but googling a little bit I found some similar cases and some answers that may help you.
- Someone with the same error message when trying to use a similar chart library was addressed here, where in short words suggests to set:

Code: Select all

java.awt.headless=true
- Another developer who found the above wasn't enough for him solved it using FilteredImageSource instead of JFrame.

If you still have problems with it, please tell us more details on your environment and how are you trying to use TeeChart Java.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply