Results 1 to 7 of 7

Thread: Unable to find JVM?!

  1. #1
    Join Date
    Dec 2006
    Location
    Australia
    Beans
    1,097
    Distro
    Xubuntu 15.10 Wily Werewolf

    Unable to find JVM?!

    I've recently uninstalled sun-java5 and installed sun-java6 from the backports repository.

    The problem is I cannot run binary executables that are supposed to launch the JVM. For example, I cannot run Eclipse using the binary launcher, because this error comes up:
    Code:
    A Java Runtime Environment (JRE) or Java Development Kit (JDK)
    must be available in order to run Eclipse. No Java virtual machine
    was found after searching the following locations:
    /home/username/eclipse/jre/bin/java
    'java' in your current PATH
    [EDIT]

    Solution found. Symlinks to java need to be created in usr/bin.
    Last edited by samjh; April 1st, 2007 at 01:35 PM. Reason: Solution found.

  2. #2
    Join Date
    Mar 2007
    Beans
    35

    Re: Unable to find JVM?!

    Samjh:

    Does java run when you attempt to launch it in the command line?

    Did you change your JAVA_HOME in /home/jhaln/.eclipse/eclipserc? It might work if your eclipserc has something like:

    Code:
    JAVA_HOME=/usr/lib/jvm/java-6-sun/
    Last edited by smokey edgy; April 1st, 2007 at 11:18 AM.

  3. #3
    Join Date
    Mar 2007
    Location
    Austin, TX
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Unable to find JVM?!

    I didn't have an eclipserc file in my ~/.eclipse. Created it, added JAVA_HOME var, exported it, and ran "source ~/.eclipse/eclipserc" and everything works perfectly. Thanks!

  4. #4
    Join Date
    Mar 2007
    Beans
    1

    Re: Unable to find JVM?!

    I'm sorry i'm a "ubuntu newbie"...

    "Symlinks to java need to be created in usr/bin"

    Do you mean something like

    ln -s /home/myuser/java1.6 /usr/bin/java ??

    Thanks.

  5. #5
    Join Date
    Dec 2006
    Location
    Australia
    Beans
    1,097
    Distro
    Xubuntu 15.10 Wily Werewolf

    Re: Unable to find JVM?!

    Yes, Lucabk.

  6. #6
    Join Date
    Apr 2007
    Beans
    15

    Re: Unable to find JVM?!

    on my fresh Hardy Heron install, I had a problem with running eclipse after installing it with synaptic (and with the (Add/Remove... tool in the main panel menu). I got the error

    Code:
    searching for compatible vm...
      testing /usr/lib/jvm/java-gcj...not found
      testing /usr/lib/kaffe/pthreads...not found
      testing /usr/lib/jvm/java-6-sun...not found
      testing /usr/lib/jvm/java-1.5.0-sun...not found
      testing /usr/lib/j2se/1.5...not found
      testing /usr/lib/j2se/1.4...not found
      testing /usr/lib/j2sdk1.5-ibm...not found
      testing /usr/lib/j2sdk1.4-ibm...not found
      testing /usr/lib/j2sdk1.6-sun...not found
      testing /usr/lib/j2sdk1.5-sun...not found
      testing /usr/lib/j2sdk1.4-sun...not found
    an error window popped up saying:
    Code:
    A Java Runtime Environment (JRE) or Java Development Kit (JDK)
    must be available in order to run Eclipse. No Java virtual machine
    was found after searching the following locations:
    /usr/lib/j2sdk1.4-sun/bin/java
    so i went searching for the java virtual machine that was installed by default. i found it in the directory /usr/lib/jvm/java-6-openjdk

    so this command

    echo 'JAVA_HOME=/usr/lib/jvm/java-6-openjdk' > ~/.eclipse/eclipserc

    created the necessary configuration file, and eclipse starts, but gives me the following complaint:

    Code:
    using specified vm: /usr/lib/jvm/java-6-openjdk
    Could not create /usr/local/lib/eclipse/.eclipseextension. Please run as root:
        touch /usr/local/lib/eclipse/.eclipseextension
        chmod 2775 /usr/local/lib/eclipse/.eclipseextension
        chown root:staff /usr/local/lib/eclipse/.eclipseextension
    so just run these commands:

    Code:
    sudo touch /usr/local/lib/eclipse/.eclipseextension
    sudo chmod 2775 /usr/local/lib/eclipse/.eclipseextension
    sudo chown root:staff /usr/local/lib/eclipse/.eclipseextension
    it's running now. i've never used eclipse before, but i'm anxious to check out eclipse-pydev

  7. #7
    Join Date
    Oct 2006
    Beans
    61

    Re: Unable to find JVM?!

    I still can't get it to run:

    A Java Runtime Environment (JRE) or Java Development Kit (JDK)
    must be available in order to run Eclipse. No Java virtual machine
    was found after searching the following locations:
    /usr/lib/j2sdk1.4-sun/bin/java

    I don't even have /usr/lib/j2sdk1.4-sun/bin/java. I'm using OpenJDK, so it should be looking in /usr/lib/jvm.

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
  •