java 错误:无法启动 RubyMine。未找到 JDK。JDK版本?+ 桌面链接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9862143/
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
ERROR: cannot start RubyMine. No JDK found. JDK Version? + desktop link
提问by Michael Durrant
ERROR: cannot start RubyMine. No JDK found. Please validate either RUBYMINE_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.
错误:无法启动 RubyMine。未找到 JDK。请验证 RUBYMINE_JDK、JDK_HOME 或 JAVA_HOME 环境变量指向有效的 JDK 安装。
I'm not sure what JDK version number to use to download it?
我不确定要使用什么 JDK 版本号来下载它?
Also how to create a desktop link in 11.10?
另外如何在 11.10 中创建桌面链接?
采纳答案by Michael Durrant
Turned out that in the end I had to do several things to get java running and thus resolve the issue:
原来,最后我不得不做几件事来让 java 运行,从而解决这个问题:
Get Java
获取 Java
Download oracle7 jdk at:
http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
e.g. http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz
在以下位置下载 oracle7 jdk:
http: //www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
例如http://download.oracle.com/otn-pub /java/jdk/7/jdk-7-linux-x64.tar.gz
Follow instructions at:
http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.htmle.g.
按照以下说明操作:
http: //www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html例如
After downloading java (above): Extract the downloaded Oracle Java JDK archive into your home folder and rename the newly created folder to "java-7-oracle".
下载 java(上图)后:将下载的 Oracle Java JDK 存档解压到您的主文件夹中,并将新创建的文件夹重命名为“java-7-oracle”。
sudo mv its_name java-7-oracle
Install Java
安装 Java
cd
sudo mkdir -p /usr/lib/jvm/ #just in case
sudo mv java-7-oracle/ /usr/lib/jvm/
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install update-java
sudo update-java # choose version 1.7 if necessary.
Check the Java install
检查 Java 安装
java -version
javac -version
I was then able to start up rubyMine successfully.
然后我就能够成功启动 rubyMine。
Create rubyMine shortcut
创建 rubyMine 快捷方式
To create the desktop launcher in Ubuntu 11.10:
在 Ubuntu 11.10 中创建桌面启动器:
Once you've installed rubymine and you have the executable somewhere:
一旦你安装了 rubymine 并且你在某处有可执行文件:
If it's called mine, then create a desktop launcher that runs it
http://www.ubuntugeek.com/how-to-create-desktop-launchers-in-ubuntu-11-10oneiric.html
如果它被称为我的,那么创建一个运行它的桌面启动器
http://www.ubuntugeek.com/how-to-create-desktop-launchers-in-ubuntu-11-10oneiric.html
You'll run (in a terminal window):
您将运行(在终端窗口中):
gnome-desktop-item-edit ~/Desktop/ --create-new
Indicate where the rubyMine executable is, e.g. use /usr/local/bin/mine
as the command to run.
指明 rubyMine 可执行文件在哪里,例如/usr/local/bin/mine
用作要运行的命令。
You can then also drag that to the left side toolbar icons area for a icon quick-launcher there.
然后,您还可以将其拖到左侧工具栏图标区域,以便在那里找到图标快速启动器。
Note:
If following these instructions and making a quick-launch icon at the end - make sure NOT to delete the desktop icon you created earlier when cleaning up your desktop as this will also remove that quick-launch item (it's a link to it).
注意:
如果遵循这些说明并在最后制作一个快速启动图标 - 请确保不要在清理桌面时删除您之前创建的桌面图标,因为这也会删除该快速启动项目(它是指向它的链接) .
回答by obenda
I think using apt-get is easier, see for example this article:
我认为使用 apt-get 更容易,例如参见这篇文章:
sudo apt-get install openjdk-7-jdk