Search code examples
ruby-on-railsubuntujavaubuntu-11.04rubymine

ERROR: cannot start RubyMine. No JDK found. JDK Version? + desktop link


ERROR: cannot start RubyMine. No JDK found. Please validate either RUBYMINE_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.

I'm not sure what JDK version number to use to download it?

Also how to create a desktop link in 11.10?


Solution

  • Turned out that in the end I had to do several things to get java running and thus resolve the issue:

    Get 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

    Follow instructions at:
    http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html e.g.

    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".

    sudo mv its_name java-7-oracle
    

    Install 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 -version
    javac -version
    

    I was then able to start up rubyMine successfully.


    Create rubyMine shortcut

    To create the desktop launcher in Ubuntu 11.10:

    Once you've installed rubymine and you have the executable somewhere:

    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

    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.

    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).