Question: I have a small problem with Eclipse on my Ubuntu machine. I installed JDK, set JAVA\_HOME and PATH variables, all seems correct, but eclipse refuses to launch and throws an error:

> 
> 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: /opt/eclipse/jre/bin/java
>  java in your current PATH
> 
> 
> 

have no clue what's the problem. help please.

note:

I am able to run java and javac in terminal.

Answer: 
You probably need to set your JAVA\_HOME env var something like:

```
export JAVA_HOME=/apps/java/jdk1.6.0_13

```

Check this [answer out](https://stackoverflow.com/questions/2030434/eclipse-no-java-jre-jdk-no-virtual-machine)
You need to create a link at /usr/bin/java for the java binary (wherever you have placed it).

```
sudo ln -s /path/to/jre*/bin/java /usr/bin/java
```