Installing IDEA on Ubuntu 11.10

2019-01-02 23:14发布

I am trying to install IDEA on Ubuntu 11.10. First, I installed openjdk-7-jdk. Then I tried running the idea.sh file as instructed. However it complains:

ERROR: cannot start IntelliJ IDEA.
No JDK found to run IDEA. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME 
environment variable points to valid JDK installation.

Press Enter to continue.

Trying to echo these three variables prints an empty line to the screen. How (and to what values) do I set these variables and proceed with the installation? Thanks.

8条回答
男人必须洒脱
2楼-- · 2019-01-02 23:46

I have had this problem a few times...

  1. Add the IDEA_HOME/bin to your PATH Make sure JAVA_HOME & other variables are correct.

then run it from the terminal:

$ idea projects-name;

OR 2: navigate into the IDEA_HOME/bin and run it from there.

查看更多
可以哭但决不认输i
3楼-- · 2019-01-02 23:46

Actually, you can configure the JAVA_HOME in bash. But, IDEA use javac and java from standard bin folders. So, you have to configure like this.

  • Download the JDK to home(~) folder
  • extract the zip file
  • use these command to mv to jvm folder under /usr/lib/jvm

    sudo mv -r ~/jdk-xx-version /usr/lib/jvm
    
  • use these commands to configure the JAVA_HOME

    sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-xx-version/bin/java" 1 
    sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk-xx-version/bin/javac" 1 
    sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk-xx-version/bin/javaws" 1
    
查看更多
登录 后发表回答