2

我正在使用 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 ~]$

即使我尝试在该站点之后更改腻子设置。

获取 HeadlessException:未设置 X11 DISPLAY 变量

但是我仍然一次又一次地得到同样的异常,你能告诉我如何解决这个问题吗?

4

1 回答 1

-1

在本地计算机上安装 X 服务器,并按照另一个问题中的说明启用 X 转发。

于 2012-12-12T16:44:58.480 回答