用于 IntelliJ IDEA 的 OpenJDK 或 Sun Java

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9673163/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-16 05:58:56  来源:igfitidea点击:

OpenJDK or Sun Java for IntelliJ IDEA

javaintellij-ideaopenjdk

提问by Dennis Ruiz

Possible Duplicate:
Installing IDEA on Ubuntu 11.10

可能重复:
在 Ubuntu 11.10 上安装 IDEA

I have running IntelliJ IDEA with OpenJDK but at startup IntelliJ IDEA from terminal it shows me:

我已经使用 OpenJDK 运行 IntelliJ IDEA,但是在从终端启动 IntelliJ IDEA 时,它显示了我:

$ ./idea.sh 
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b24~pre2-1)
OpenJDK Server VM (build 20.0-b12, mixed mode)
WARNING: You are launching IDE using OpenJDK Java runtime.

 THIS IS STRICTLY UNSUPPORTED DUE TO KNOWN PERFORMANCE AND GRAPHICS PROBLEMS!

 NOTE:    If you have both Oracle (Sun) JDK and OpenJDK installed
          please validate either IDEA_JDK, JDK_HOME, or JAVA_HOME environment          variable points to valid Oracle (Sun) JDK installation.
          See http://ow.ly/6TuKQ for more info on switching default JDK

 Press Enter to continue.

I have runing intelliJ IDEA because it requires "tools.jar", then I have that file on:

我运行 intelliJ IDEA 因为它需要“tools.jar”,然后我有那个文件:

/usr/lib/jvm/java-6-openjdk-i386/lib

but "tools.jar" isn't over: /usr/lib/jvm/java-6-sun-1.6.0.26

但“tools.jar”还没有结束:/usr/lib/jvm/java-6-sun-1.6.0.26

So, my question is: someone had problems using OpenJDK?

所以,我的问题是:有人在使用 OpenJDK 时遇到了问题?

回答by CrazyCoder

You can get full Oracle JDK with tools.jar on your Linux as described in this answer.

本回答所述,您可以在 Linux 上使用 tools.jar 获取完整的 Oracle JDK 。

You can use OpenJDK on your own risk, but JetBrains will not accept support requests when you are running on it since the problems you want to report could be specific to this JDK.

您可以自担风险使用 OpenJDK,但 JetBrains 在您运行时不会接受支持请求,因为您要报告的问题可能特定于此 JDK。

回答by Bit-Man

I had problems with IntelliJ IDEA 11 and OpenJDK 6. When compiling it thrown the next error:

我在使用 IntelliJ IDEA 11 和 OpenJDK 6 时遇到了问题。编译时抛出了下一个错误:

Error: *.class (No such file or directory)

Switching to OpenJDK 7 solved the problem.

切换到 OpenJDK 7 解决了这个问题。

回答by rico

You have to move from OpenJDK to OracleJDK because of compatibility and performance issues. Have a look to this linkto install Oracle JDK7 if you use Ubuntu.

由于兼容性和性能问题,您必须从 OpenJDK 迁移到 OracleJDK。如果您使用 Ubuntu,请查看此链接以安装 Oracle JDK7。