Cannot understand this No X11 DISPLAY variable error thrown at me

0 votes

So, I tried to install a Java application on my Linux machine (Slackware) and I have received the following error which I fail to understand.

Here is what I get: 

~$ java -jar gate-5.0-beta1-build3048-installer.jar
- ERROR -

java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(Graphic sEnvironment.java:159)
at java.awt.Window.<init>(Window.java:407)
at java.awt.Frame.<init>(Frame.java:402)
at net.sourceforge.mlf.metouia.borders.MetouiaDotsBuf fer.<init>(MetouiaDotsBuffer.java:105)
at net.sourceforge.mlf.metouia.borders.MetouiaDots.<i nit>(MetouiaDots.java:66)
at net.sourceforge.mlf.metouia.borders.MetouiaToolBar Border.<init>(MetouiaToolBarBorder.java:49)
at net.sourceforge.mlf.metouia.MetouiaLookAndFeel.ini tComponentDefaults(MetouiaLookAndFeel.java:241)
at javax.swing.plaf.basic.BasicLookAndFeel.getDefault s(BasicLookAndFeel.java:130)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefault s(MetalLookAndFeel.java:1591)
at javax.swing.UIManager.setLookAndFeel(UIManager.jav a:537)
at javax.swing.UIManager.setLookAndFeel(UIManager.jav a:581)
at com.izforge.izpack.installer.GUIInstaller.loadLook AndFeel(GUIInstaller.java:373)
at com.izforge.izpack.installer.GUIInstaller.<init>(G UIInstaller.java:116)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:30
at com.izforge.izpack.installer.Installer.main(Instal ler.java:62)

Could anyone tell me how to approach this problem?

Jun 5, 2019 in Linux Administration by Shubham
• 13,490 points
10,746 views

1 answer to this question.

0 votes

If you're on the main display, then

export DISPLAY=:0.0

or if you're using csh or tcsh

setenv DISPLAY :0.0

before running your application.

Hope this helps!

Get your Linux certification today to become certified.

Thanks.

answered Jun 5, 2019 by Upasana
• 8,620 points

Related Questions In Linux Administration

0 votes
1 answer

How to display a simple list of all disks, like this /dev/sda /dev/sdb ?

You can list all the disk in ...READ MORE

answered Jul 12, 2018 in Linux Administration by DearestOne
• 200 points
5,459 views
0 votes
0 answers
0 votes
0 answers

How to fix 'sudo: no tty present and no askpass program specified' error?

I  wanted to compile sources using a ...READ MORE

May 9, 2022 in Linux Administration by Kichu
• 19,040 points
1,143 views
0 votes
1 answer
0 votes
1 answer

Serverspec doesn't check package version correctly

Specinfra is escaping the characters in the with_version chain ...READ MORE

answered Aug 2, 2018 in DevOps Tools by Kalgi
• 52,350 points
1,348 views
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
1,185 views
0 votes
1 answer
0 votes
1 answer

Error: tkinter for Python Installation

It isn't easy to install Tkinter locally ...READ MORE

answered Jul 4, 2019 in Linux Administration by Upasana
• 8,620 points
968 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP