在 Ubuntu 14.04 中使用 OpenJDK Java7 运行时运行 Java Web 应用程序时出错

在 Ubuntu 14.04 中使用 OpenJDK Java7 运行时运行 Java Web 应用程序时出错

我的 HP Pavilion g6 笔记本电脑上安装了全新的 Ubuntu 14.04。

我已经安装OpenJDK冰茶插件来运行 Java 应用程序这里

但当我要国际象棋网网站并选择与电脑对战选项显示错误。“单击此处查看详细信息,发生异常”

在此处输入图片描述

然后我从终端运行 Firefox,并再次打开 Java 应用程序。终端输出如下

bibi@bibi-HP-Pavilion-g6-Notebook-PC:~$ firefox

 (process:32619): GLib-CRITICAL **: g_slice_set_config: assertion
 'sys_page_size == 0' failed

 java version "1.7.0_55" OpenJDK Runtime
 Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1) OpenJDK 64-Bit
 Server VM (build 24.51-b03, mixed mode) No permission to use the
 keyboard API for http://googleads.g.doubleclick.net
 java.io.FileNotFoundException:
 http://www.chess.com/play/ChessApplet.1.14.18.jar  at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at
 sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at
 sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)   at
 sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
    at
 net.sourceforge.jnlp.util.HttpUtils.consumeAndCloseConnection(HttpUtils.java:66)
    at
 net.sourceforge.jnlp.util.HttpUtils.consumeAndCloseConnectionSilently(HttpUtils.java:52)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCodeWithRedirectonResult(ResourceTracker.java:907)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.findBestUrl(ResourceTracker.java:955)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.initializeResource(ResourceTracker.java:788)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.processResource(ResourceTracker.java:628)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.access$600(ResourceTracker.java:79)
    at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1235)
    at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1233)
    at java.security.AccessController.doPrivileged(Native Method)   at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader.run(ResourceTracker.java:1233)
    at java.lang.Thread.run(Thread.java:744) Caused by:
 java.io.FileNotFoundException:
 http://www.chess.com/play/ChessApplet.1.14.18.jar  at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
    at
 java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCodeWithRedirectonResult(ResourceTracker.java:903)
    ... 9 more

 java.io.FileNotFoundException:
 http://www.chess.com/play/ChessApplet.1.14.18.jar  at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at
 sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at
 sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)   at
 sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
    at
 net.sourceforge.jnlp.util.HttpUtils.consumeAndCloseConnection(HttpUtils.java:66)
    at
 net.sourceforge.jnlp.util.HttpUtils.consumeAndCloseConnectionSilently(HttpUtils.java:52)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCodeWithRedirectonResult(ResourceTracker.java:907)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.findBestUrl(ResourceTracker.java:955)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.initializeResource(ResourceTracker.java:788)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.processResource(ResourceTracker.java:628)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.access$600(ResourceTracker.java:79)
    at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1235)
    at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1233)
    at java.security.AccessController.doPrivileged(Native Method)   at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader.run(ResourceTracker.java:1233)
    at java.lang.Thread.run(Thread.java:744) Caused by:
 java.io.FileNotFoundException:
 http://www.chess.com/play/ChessApplet.1.14.18.jar  at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
    at
 java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCodeWithRedirectonResult(ResourceTracker.java:903)
    ... 9 more

 No permission to use the keyboard API for
 http://googleads.g.doubleclick.net java.io.FileNotFoundException:
 http://www.chess.com/play/ChessApplet.1.14.18.jar  at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at
 sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at
 sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)   at
 sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
    at
 net.sourceforge.jnlp.util.HttpUtils.consumeAndCloseConnection(HttpUtils.java:66)
    at
 net.sourceforge.jnlp.util.HttpUtils.consumeAndCloseConnectionSilently(HttpUtils.java:52)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCodeWithRedirectonResult(ResourceTracker.java:907)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.findBestUrl(ResourceTracker.java:955)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.initializeResource(ResourceTracker.java:788)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.processResource(ResourceTracker.java:628)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.access$600(ResourceTracker.java:79)
    at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1235)
    at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1233)
    at java.security.AccessController.doPrivileged(Native Method)   at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader.run(ResourceTracker.java:1233)
    at java.lang.Thread.run(Thread.java:744) Caused by:
 java.io.FileNotFoundException:
 http://www.chess.com/play/ChessApplet.1.14.18.jar  at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
    at
 java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCodeWithRedirectonResult(ResourceTracker.java:903)
    ... 9 more

 java.io.FileNotFoundException:
 http://www.chess.com/play/ChessApplet.1.14.18.jar  at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at
 sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at
 sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)   at
 sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
    at
 net.sourceforge.jnlp.util.HttpUtils.consumeAndCloseConnection(HttpUtils.java:66)
    at
 net.sourceforge.jnlp.util.HttpUtils.consumeAndCloseConnectionSilently(HttpUtils.java:52)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCodeWithRedirectonResult(ResourceTracker.java:907)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.findBestUrl(ResourceTracker.java:955)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.initializeResource(ResourceTracker.java:788)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.processResource(ResourceTracker.java:628)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.access$600(ResourceTracker.java:79)
    at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1235)
    at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1233)
    at java.security.AccessController.doPrivileged(Native Method)   at
 net.sourceforge.jnlp.cache.ResourceTracker$Downloader.run(ResourceTracker.java:1233)
    at java.lang.Thread.run(Thread.java:744) Caused by:
 java.io.FileNotFoundException:
 http://www.chess.com/play/ChessApplet.1.14.18.jar  at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
    at
 java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at
 net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCodeWithRedirectonResult(ResourceTracker.java:903)
    ... 9 more

 Attempted to download
 http://www.chess.com/play/ChessApplet.1.14.18.jar, but failed to
 connect! JAR http://www.chess.com/play/ChessApplet.1.14.18.jar not
 found. Continuing. JAR
 http://www.chess.com/play/ChessApplet.1.14.18.jar not found.
 Continuing. netx: Initialization Error: Could not initialize applet.
 (Fatal: Initialization Error: Unknown Main-Class. Could not determine
 the main class for this application.) netx: Initialization Error:
 Could not initialize applet. (Fatal: Initialization Error: Unknown
 Main-Class. Could not determine the main class for this application.)
 net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error:
 Could not initialize applet. For more information click "more
 information button".   at
 net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:746)  at
 net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:675)     at
 net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:908) Caused
 by: net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error:
 Unknown Main-Class. Could not determine the main class for this
 application.   at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:684)
    at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.<init(JNLPClassLoader.java:277)
    at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:351)
    at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:418)
    at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:394)
    at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:711)    ...
 2 more

 net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error:
 Could not initialize applet. For more information click "more
 information button".   at
 net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:746)  at
 net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:675)     at
 net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:908) Caused
 by: net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error:
 Unknown Main-Class. Could not determine the main class for this
 application.   at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:684)
    at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.<init(JNLPClassLoader.java:277)
    at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:351)
    at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:418)
    at
 net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:394)
    at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:711)    ...
 2 more

 Error on Java side: 

 Error: Unable to fetch applet instance id from Java side.

  Error on Java side: 

  Error: Unable to fetch applet instance id from Java side.

  NOTE: child process received `Goodbye', closing down

  NOTE: child process received `Goodbye', closing down

  bibi@bibi-HP-Pavilion-g6-Notebook-PC:~$

这个问题有解决办法吗?任何帮助都将不胜感激。谢谢。

答案1

我尝试使用 OpenJDK,但遇到了同样的问题。

在此处输入图片描述

尝试使用 Oracle Java 8,效果很好。尝试使用 Oracle Java 代替 OpenJDK。

在此处输入图片描述

相关内容