• Register
0 votes

Problem :

I have installed Java application on my Linux machine and now i am receiving following error :

no x11 display variable was set, but this program performed an operation which requires it.

6.9k points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

To resolve the issue you should enable X11 forwarding in your PuTTy

Now to do that please open PuTTy also go to Connection => SSH => Tunnels and do check mark the Enable X11 forwarding

Also do sudo to the server and export the following variable also note here IP is your local machine's IP

export DISPLAY=

enter image description here

38.6k points
0 votes

When you are exporting the Display to other machines, make sure you have entered the command xhost+ on that machine. This command allows the other machines to export their display on this machine. There can be many security constraints. You need to check ssh –X MachineIP is not required by xhost +?


Sometimes JCONSOLE does not allow all its processes. Since those JVM run with different users and you are trying to export the DISPLAY with another user. So it is better to follow C_DIR > sudo./jconsole.


In was ( WEBSPAHERE); jconsole was not able to connect its java server process. At that time just go to the link, and then try again to connect. It is also possible that this page is initializing some variables to enable jconsole to connect with the server.

WAS -> Console -> Application servers -> server1 -> Process definition -> Java virtual machine.

NX clients for windows:

  • Through this Windows machine, Connect to Unix box where GUI console is available.
  • Move SSH to the AIX box from the UNIX box.
  • Set the display like “export DISPLAY = UNIXMACHINE:NXClientPORTConnectedMentionedOnTitle”
  • Now when you launch any program, that requires DISPLAY, it will be launched on the UNIX box.


3.9k points