You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Oliver Erlewein (DSLWN)" <Ol...@datacom.co.nz> on 2006/05/09 03:11:23 UTC

Jmeter error and the DISPLAY variable (jmeter on Linux)

Hi all,

I ran into this (simple) problem on my Fedora Core 4/5 boxes and just
wanted to post a solution for those with similar problems.

The error that jmeter throws is:

> # ./jmeter
> 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:317)
>        at java.awt.Frame.<init>(Frame.java:419)
>        at java.awt.Frame.<init>(Frame.java:384)
>        at javax.swing.JFrame.<init>(JFrame.java:150)
>        at org.apache.jmeter.gui.MainFrame.<init>(MainFrame.java:117)
>        at org.apache.jmeter.JMeter.startGui(JMeter.java:197)
>        at org.apache.jmeter.JMeter.start(JMeter.java:265)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> av
> a:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> or
> Impl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at org.apache.jmeter.NewDriver.main(NewDriver.java:162)
> An error occurred:
> No X11 DISPLAY variable was set, but this program performed an 
> operation which requires it.

To set the DISPLAY variable enter the following lines. If you do not use
the standard X-Window output please change the localhost:0 part. This is
for bash shell:

# DISPLAY=localhost:0
# export DISPLAY

Cheers Oliver

P.S. You have to set this even on machines with no X-Windows installed!
Jmeter needs this even when running in server mode.

Cheers
Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org