5
votes

Hi everybody.

The problem: elcipse-3.5.0 (Galileo) spits with an error when I try to launch it by clicking its launcher. The curse sound like this:

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/emanemos/bin/eclipses/eclipse-3.5.0/jre/bin/java
java in your current PATH

However, everything goes smoothly when eclipse is started from console.

Before installing eclipse I've installed jdk1.6.0_16. I also created the $JAVA_HOME variable and changed my $PATH:

$ echo $JAVA_HOME
/usr/lib/java/jdk1.6.0_16
$ echo $PATH
/home/emanemos/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/java/jdk1.6.0_16/jre/bin

So that, my terminal got to know what java is:

$ java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)

Then a folder eclipse was extracted from .tar.gz package under the directory ~/bin/eclipses. I changed the folder's name eclipse to eclipse-3.5.0 and changed $PATH again:

$ echo $PATH
/home/emanemos/bin/eclipses/eclipse-3.5.0:/home/emanemos/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/java/jdk1.6.0_16/jre/bin

From this moment I was blessed to launch eclipse from console by the command eclipse.

However, I feel desperate about using the eclipse's application launcher.

Thanks in advance. I would be grateful for any help.

5

5 Answers

1
votes

Add this to eclipse.ini:-

-vm $Java_home/jdk1.5.0_14/bin/javaw.exe

2
votes

The message says "No Java virtual machine was found after searching the following locations: /Applications/eclipse/Eclipse.app/Contents/MacOS/jre/bin/"

I have solved it creating the folder /Applications/eclipse/Eclipse.app/Contents/MacOS/jre/bin and linking to the command at /usr/bin/java:

ln -s /usr/bin/java /Applications/eclipse/Eclipse.app/Contents/MacOS/jre/bin/java
0
votes

I could be off, but it looks to me that you don't have JAVA in your path. If you notice, you had to add it via the echo command. However, that only stays for that session of the terminal. You don't permanently affect the system. (I believe that's why you can launch from the terminal, but not via the launcher.)

Do you have the Java JRE actually installed on your system? If not, I would recommend doing that as that should do all the setup that you would need, then try running Eclipse again.

Edit: I noticed you said that you did install the 1.6 JDK. This should have fixed your problem. If Java is not in your path when you first open up your terminal, then that (I believe) is your real problem and you may need to do a reinstall or troubleshoot there.

0
votes

(Making a big assumption that you're on Linux using X)

If you've installed the Java JRE without logging out and back in to the X session, the environment the session is in won't contain the $JAVA_HOME variable. It may just be a case of logging out and back in in order to get a new X session.

If you want to keep the same session running, you could try it out by pressing Ctrl+Alt+F9 to start another GUI session.

0
votes

Fazil Baghirzade i solve the this problem

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: c:\Program Files\Eclipse\jre\bin\javaw.exe 'javaw.exe' in your current path

go to the "C:\Program Files\Java\jdk1.6.0_39" in this folder have "jre" folder copy it and paste the eclipse folder

thats all!!!