A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
mrburns2002
- Posts: 6
- Joined: Tue Feb 10, 2009 12:50 pm
Post
by mrburns2002 » Fri Apr 03, 2009 12:26 pm
Hi,
I was running some JFree methods on a server an following error occurred:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
Code: Select all
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:406)
at java.awt.Frame.<init>(Frame.java:402)
at javax.swing.JFrame.<init>(JFrame.java:207)
at org.jfree.ui.ApplicationFrame.<init>(ApplicationFrame.java:65)
at de.tudarmstadt.ukp.dkpro.community_mining.reader.TimeSeriesChart.<init>(TimeSeriesChart.java:82)
at de.tudarmstadt.ukp.dkpro.community_mining.reader.TrendReader.createTagCoocChart(TrendReader.java:835)
at de.tudarmstadt.ukp.dkpro.community_mining.reader.TrendReader.getNext(TrendReader.java:360)
at org.apache.uima.collection.impl.cpm.engine.ArtifactProducer.readNext(ArtifactProducer.java:494)
at org.apache.uima.collection.impl.cpm.engine.ArtifactProducer.run(ArtifactProducer.java:711)
Do you have an idea how to disable the X11 set? As the server does not support X11, I would like to deactivate the GUI - I just want the program to generate my PNG files silently!
Is that possible?
-
mrburns2002
- Posts: 6
- Joined: Tue Feb 10, 2009 12:50 pm
Post
by mrburns2002 » Mon Apr 06, 2009 5:00 pm
This problem still occurs. Even after having taken your ideas into account.
Is it possible to redirect the output to my local server? I am using ssh.
-
Taqua
- JFreeReport Project Leader
- Posts: 698
- Joined: Fri Mar 14, 2003 3:34 pm
-
Contact:
Post
by Taqua » Fri Apr 10, 2009 3:01 pm
So why dont you simply enable X11-Fowarding then? See your faviourite sshd.conf man-page for details on that.
But be aware that the use of ApplicationFrame classes outside of demo code is rarely correct (unless correctness includes the hard killing of your application via "System.exit(0)" - as this is what happens if you close the frame). JFreeChart is happily usable without any frames. Creating frames will cause Headless-Exceptions (if you enable headless mode), so in case you write a server application (or anything that does not require a UI) you will shot yourself in the foot whenever you use Frames, Windows or anything in that direction.