You are not logged in.

#1 2008-04-07 20:12:47

Yes
Member
Registered: 2008-03-29
Posts: 163

Eclipse can't find the path to JVM

I tried running Eclipse and got an error that said that it looked for Java in /usr/share/eclipse/jre/bin/java and couldn't find it, so it can't run.

I'm pretty sure both the JVM and JDK are installed, although running 'java' and 'javac' result in "bash: java/javac: command not found".

Thanks.

Offline

#2 2008-04-07 22:57:55

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Eclipse can't find the path to JVM

Do you have the files /etc/profile.d/{jre,jdk}.sh?  Do they get sourced when you log in?  They should.  They are the ones that set up the various paths required to run java.  I'd also have a look at /etc/profile.  It should contain this part, that sources all files in /etc/profile.d:

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
        test -x $profile && . $profile
    done
    unset profile
fi

Offline

#3 2008-04-08 19:58:08

hasse
Member
From: Vejle, Denmark
Registered: 2008-04-02
Posts: 23
Website

Re: Eclipse can't find the path to JVM

export PATH=$PATH:/opt/java/bin:/opt/java/jre/bin

check the paths exists

export JAVA_HOME=/opt/java/jre

that helped me

/Hasse

Offline

#4 2008-04-10 00:01:22

Yes
Member
Registered: 2008-03-29
Posts: 163

Re: Eclipse can't find the path to JVM

Thanks, the export PATH worked.

Offline

Board footer

Powered by FluxBB