我正在使用Putty连接到远程运行的服务器。 为监控服务器,我在putty终端下输入了jconsole
我得到的是以下异常。
[user001@test.hhh.com ~]$ jconsole
Exception in thread "AWT-EventQueue-0" 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:432)
at java.awt.Frame.<init>(Frame.java:403)
at javax.swing.JFrame.<init>(JFrame.java:202)
at sun.tools.jconsole.JConsole.<init>(JConsole.java:97)
at sun.tools.jconsole.JConsole$6.run(JConsole.java:770)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
[user001@test.hhh.com ~]$
即使我尝试更改网站后面的Putty设置。
Getting a HeadlessException: No X11 DISPLAY variable was set
但我一次又一次得到同样的例外情况,请你告诉我如何解决这个问题?
答案 0 :(得分:-1)
在本地计算机上安装X服务器,并启用其他问题中给出的X转发。