Java 在 Ubuntu 上为 Open JDK 7 安装 JNLP
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23925666/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing JNLP on Ubuntu for Open JDK 7
提问by Andrew Grimm
How do I get JNLP working for OpenJDK 7 on a Ubuntu machine?
如何让 JNLP 在 Ubuntu 机器上为 OpenJDK 7 工作?
I'm trying to get the source code linked to at http://www.bugaco.com/bioinf/clusterer/with the text "Download sources" to run on my machine.
我正在尝试获取链接到http://www.bugaco.com/bioinf/clusterer/的源代码,其中包含文本“下载源代码”以在我的机器上运行。
Currently, when I try running
目前,当我尝试跑步时
javac -cp ".:l2fprod-common-all-7.3.jar:jfreechart-1.0.17/lib/jfreechart-1.0.17.jar" com/bugaco/mioritic/impl/module/project/Main.java
it is giving me the error
它给了我错误
./com/bugaco/ui/LoadBean.java:11: error: package javax.jnlp does not exist
import javax.jnlp.FileOpenService;
^
(and many other errors)
(以及许多其他错误)
which I assume indicates that I need to install JNLP, along with other packages I'll have to install when I get JNLP fixed.
我认为这表明我需要安装 JNLP,以及我在修复 JNLP 时必须安装的其他软件包。
Based on Mike Clark's answer https://stackoverflow.com/a/12608844/38765I assumed that "Demos and Samples" is the way to install JNLP for Open JDK 7.
基于 Mike Clark 的回答https://stackoverflow.com/a/12608844/38765,我认为“Demos and Samples”是为 Open JDK 7 安装 JNLP 的方法。
I'm on Ubuntu, so I'm trying to use the "Ubuntu way" to install it. I installed openjdk-7-demo , which describes itself as "Java runtime based on OpenJDK (demos and examples)".
我在 Ubuntu 上,所以我试图使用“Ubuntu 方式”来安装它。我安装了 openjdk-7-demo ,它将自己描述为“基于 OpenJDK(演示和示例)的 Java 运行时”。
It's still giving the error described above. What have I done wrong, or forgotten to do?
它仍然给出上述错误。我做错了什么,或者忘记做什么?
I tried browsing the tag wiki for java. The only non-video resource that looked relevant to me in "Beginners' resources" was "The Java Tutorials". The only link relevant from there was "Learning the Java Language". It had a section on packages, but that's only on how to create your own, rather than how to install other peoples' packages.
我尝试浏览 Java 的标签 wiki。在“初学者资源”中与我相关的唯一非视频资源是“Java 教程”。唯一相关的链接是“学习 Java 语言”。它有一个关于包的部分,但这只是关于如何创建自己的包,而不是如何安装其他人的包。
I'm using Ubuntu 12.04 (precise) 64-bit, and Java 7
我使用的是 Ubuntu 12.04(精确)64 位和 Java 7
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
回答by bjimba
If you want to use JNLP with OpenSDK, you need the IcedTea implementation of JNLP.
如果要在 OpenSDK 中使用 JNLP,则需要 JNLP 的 IcedTea 实现。
In Ubuntu, install the "icedtea-netx" package.
在 Ubuntu 中,安装“icedtea-netx”包。
The libraries you need will be in /usr/share/icedtea-web/.
您需要的库将在 /usr/share/icedtea-web/ 中。
回答by Francine Lin
Just use $ javaws xxxxx.jnlp.
It works to me on :
只需使用$ javaws xxxxx.jnlp。
它适用于我:
(open-jdk-7 + Ubuntu 14.04)