我正在尝试在我的新Amazon EC2 Linux实例上安装Glassfish.
安装告诉我设置DISPLAY变量.
我使用http://www.whatismyip.com确定我的IP(例如123.45.67.89)
我在Mac上打开X11并在linux中设置了ip地址(例如export DISPLAY = 123.45.67.89)
但Glassfish安装正在抛出异常
<code>java.lang.InternalError: Can't connect to X11 window server using '123.45.67.89' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) ... </code>
有任何想法吗?
解决方法:
你的mac可能没有通过远程接口提供X(一个相对理智的默认值).这样做的惯用方法是将其通过ssh进行隧道传输,这有助于减轻配置DISPLAY变量的负担(更不用说为您节省了明确输入Glassfish凭据的尴尬!).
从你的mac:
<code>ssh -X user@remotehost </code>
现在,在remotehost上:
<code>./run_glassfish_somehow </code>
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!