Results 1 to 10 of 10

Thread: [SOLVED] I've set the JAVA_HOME but still cannot run Intellij IDEA

  1. #1
    Join Date
    Feb 2008
    Beans
    83
    Distro
    Ubuntu 8.04 Hardy Heron

    Unhappy [SOLVED] I've set the JAVA_HOME but still cannot run Intellij IDEA

    Hi everyone,

    I had a thread for the same problem 2 days ago but since no one cared I thought not to bother with the old thread and create a new one. First of all I have to say that I'm using java-6-openjdk as my JDK.


    I believe I've set the JAVA_HOME:

    The last lines in my bash.bashrc

    export JAVA_HOME="/usr/lib/jvm/java-6-openjdk/"
    export CATALINA_HOME="/home/soheil/Programs/apache-tomcat-6.0.14/"
    export JDK_HOME="/usr/lib/jvm/java-6-openjdk/"
    I've also set the PATH variable for IDEA's /bin:

    Lines in /etc/environmet

    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/soheil/Programs/idea-7590/bin"
    LANG="en_US.UTF-8"
    LANGUAGE="en_US:en"
    And run this command:

    source /etc/environment
    Also set "/usr/lib/jvm/java-6-openjdk" it in the /etc/jvm as the highest priority JVM. And set it as the default JVM through this:

    update-java-alternatives -s java-6-openjdk
    The problem though is, when I try to run idea.sh the following errors come up:

    ERROR: cannot start IntelliJ IDEA.
    No JDK found to run IDEA. Please validate either IDEA_JDK or JDK_HOME points to valid JDK installation
    exec: 61: /bin/java: not found
    Please someone help me with this. I really need to run IDEA 'cause I got some work to do. I'm desperate right now ...

    Thanks in advance.

  2. #2
    Join Date
    Feb 2008
    Beans
    83
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: I've set the JAVA_HOME but still cannot run Intellij IDEA

    again no help ... ?

  3. #3
    Join Date
    Jun 2006
    Location
    The Netherlands
    Beans
    2,185
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: I've set the JAVA_HOME but still cannot run Intellij IDEA

    Remove the slashes at the end of the directory names, for example:
    Code:
    export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
    instead of
    Code:
    export JAVA_HOME="/usr/lib/jvm/java-6-openjdk/"
    Ubuntu 12.04

  4. #4
    Join Date
    Oct 2008
    Beans
    6

    Re: I've set the JAVA_HOME but still cannot run Intellij IDEA

    You aren't reading the error closely enough, it tells you EXACLTY what you need to do.

    The error doesn't say anything about setting JAVA_HOME. It says to set JDK_HOME or IDEA_JDK.

    Add this to your /etc/environment, I have found you need to logout and log back in for the /etc/environment changes to take effect (sourcing it doesn't work for a GUI app). Set it to the location of your java and with the appropriate version of course.

    JDK_HOME=/usr/java/jdk1.6.0_10

  5. #5
    Join Date
    Feb 2008
    Beans
    83
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: I've set the JAVA_HOME but still cannot run Intellij IDEA

    I've tested with or without the slashes but no change at all. Also about JDK_HOME and IDEA_JDK you see my bash.bashrc. They're set.

    The Thing is when I got Gutsy, I had no problem running it but since I updated it to Hardy I've this problem. I wonder if the problem is
    exec: 61: /bin/java: not found
    in the last line console output.

  6. #6
    Join Date
    Oct 2008
    Beans
    6

    Re: I've set the JAVA_HOME but still cannot run Intellij IDEA

    Are you trying to start intellij from the command line or a menu item?

    If from the command-line please show me the output of this:

    env | grep -i JDK


    If from a menu item you need to add JDK_HOME declaration to /etc/environment then logout and back in (may have to reboot, but pretty sure just log out an in works, you can't just source it [well you can but it only applies to the terminal you sourced it from])
    Last edited by mjparme; October 27th, 2008 at 07:50 PM. Reason: bad spelling and grammar

  7. #7
    Join Date
    Feb 2008
    Beans
    83
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: I've set the JAVA_HOME but still cannot run Intellij IDEA

    I'm running from command line. I have this problem for a week and dude believe me I have logged out and in a dozen times but that's just the same .
    I think setting the JAVA_HOME or JDK_HOME in .bashrc file should suffice. BTW sourcing does make the changes permanent. That makes the $PATH variable to pick up the new directory. And here's the env | grep -i JDK output:

    JAVA_HOME=/usr/lib/jvm/java-6-openjdk
    JDK_HOME=/usr/lib/jvm/java-6-openjdk
    Anything else? And again what about the last line of error ...
    I appreciate any IDEA

  8. #8
    Join Date
    Feb 2008
    Beans
    83
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: I've set the JAVA_HOME but still cannot run Intellij IDEA

    Thanks for not helping. I guess I have to go back to Windows or at least switch to Eclipse for a while.

  9. #9
    Join Date
    Nov 2008
    Beans
    7

    Re: [SOLVED] I've set the JAVA_HOME but still cannot run Intellij IDEA

    I don't know if you've solved this issue yet, but from what I've read, you can't use openJDK for IntelliJ. Try using Sun's JDK.

  10. #10
    Join Date
    Oct 2010
    Beans
    6

    Re: [SOLVED] I've set the JAVA_HOME but still cannot run Intellij IDEA

    I had a similar problem.
    I'm using sun jdk. After update from version 1.6.0.20 to 1.6.0.22 my IntellIJ IDEA did not want to start and just gave me error:
    exec: 61: /usr/lib/jvm/java-6-sun-1.6.0.20: not found
    I modified my /etc/environment to accept new version of jdk:
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib"
    JRE_HOME="/usr/lib/jvm/java-6-sun-1.6.0.22/jre"
    JDK_HOME="/usr/lib/jvm/java-6-sun-1.6.0.22"
    Previous version was:
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib"
    JRE_HOME="/usr/lib/jvm/java-6-sun-1.6.0.20/jre"
    JDK_HOME="/usr/lib/jvm/java-6-sun-1.6.0.20"
    But "echo $JDK_HOME" was still "/usr/lib/jvm/java-6-sun-1.6.0.20".

    I searched for files containing string "JDK_HOME" and found ~/.profile. There was:
    JDK_HOME="/usr/lib/jvm/java-6-sun-1.6.0.20"
    I do not remember, whether I edited this file myself. But after I removed this line, IDEA works fine

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •