当前位置: 代码迷 >> Java Web开发 >> 新浪开放平台的oath授权页面是在服务器端打开的,linux服务器没GUI界面,打开报错如何破
  详细解决方案

新浪开放平台的oath授权页面是在服务器端打开的,linux服务器没GUI界面,打开报错如何破

热度:10150   发布时间:2016-04-11 00:00:56.0
新浪开放平台的oath授权页面是在服务器端打开的,linux服务器没GUI界面,打开报错怎么破
http://open.weibo.com/qa/index.php?qa=20610&qa_1=centos-%E6%97%A0gui-%E6%89%93%E5%BC%80%E6%8E%88%E6%9D%83%E9%A1%B5%E9%9D%A2%E5%87%BA%E9%94%99-%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%AB%AF%E6%89%93%E5%BC%80%E6%8E%88%E6%9D%83%E9%A1%B5%E5%A5%BD%E6%81%B6%E5%BF%83%EF%BC%8C%E5%A4%A7%E5%AE%B6%E9%83%BD%E6%80%8E%E4%B9%88%E8%A7%A3%E5%86%B3%E7%9A%84
Struts Problem Report

Struts has detected an unhandled exception:

Messages:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
File: java/awt/GraphicsEnvironment.java
Line number: 207
Stacktraces

java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    java.awt.Window.(Window.java:535)
    java.awt.Frame.(Frame.java:420)
    java.awt.Frame.(Frame.java:385)
    javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1759)
    javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1834)
    javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1697)
    javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863)
    javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667)
    javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638)
    javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:609)
    weibo4j.util.BareBonesBrowserLaunch.openURL(BareBonesBrowserLaunch.java:29)
    cn.baojieearth.action.WeiboAction.oath(WeiboAction.java:21)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:601)


求破啊

------解决方案--------------------
安装对应的GUI包。suse linux 的好像是x11.i586.rpm.
你找一下centos的对应安装包安装一下就行了