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: 
1. open your eclipse.ini file
2. add
-vm
usr/lib/jvm/jdk1.8.x\_xx/jre/bin/java
this must be placed before -vmarg
3. save the file
4. start your eclipse
Happy Coding...
it seems eclipse looks for java under /usr/bin directory, making a symbolic link of the java command in this dir would solve your problems, at least solve mine