2014-01-30 104 views
0

我已經下載並提取tar文件,但是當我嘗試運行webstorm.sh文件,我得到的錯誤:Webstorm在CentOS 6.5

"No JDK found. Please validate either WEBIDE_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation. 

我安裝了Java:

[[email protected]]# java -version 
java version "1.7.0_51" 
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02) 
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode) 

[[email protected]]# ls -lah /etc/alternative/java 
lrwxrwxrwx. 1 root root 46 Jan 27 23:06 /etc/alternatives/java -> /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java 

我也設置了環境路徑,雖然我不是100%確定它的正確性。 .bash_profile的內容:

PATH=$PATH:$HOME/bin 

export PATH 
export JDK_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin 
export JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin 
export PATH=$PATH:/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin 

我在想什麼/做錯了什麼?

回答

0

如果檢查System Requirements and Installation頁WebStorm的網站,您將看到Linux的下列要求...

System Requirements

  • Intel Pentium III/800 MHz or higher (or compatible)
  • 512 MB RAM minimum, 1 GB RAM recommended
  • 1024x768 minimum screen resolution
  • Oracle (Sun) JDK 1.6 or higher. Open JDK is not supported.
  • GNOME or KDE desktop.

並經系統確認...

OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02) 
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode) 

這是爲什麼你的WebStorm抱怨valid JDK installation

正如WebStorm的網站所引用,文章Swapping OpenJDK for Sun JDK on Ubuntu可能對您有用。

0

Sun JDK和OpenJDK包含在同一個安裝程序中。 OpenJDK默認使用。從Oracle站點下載並安裝JDK後,要專門使用Sun JDK,必須運行以下命令:

[[email protected]]# alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000