我正在使用安装了java8版本的Ubuntu 12.04机器。我已经安装了389 Ldap服务器,但是当我尝试执行命令389-console
时,我得到以下错误:
Exception in thread "main" 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:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:189)
at com.netscape.management.client.console.Console.<init>(Unknown Source)
at com.netscape.management.client.console.Console.main(Unknown Source)
我甚至运行了命令DISPLAY=:0.0
,但仅在执行389-console
请告诉我如何解决上述问题?
答案 0 :(得分:0)
也许已经很晚了,但问题仍然没有得到解答,所以我会回答任何关注此链接的人。
登录服务器时,请尝试使用-X
标志
ssh -X username@hostname
希望有所帮助