Java is properly installed in my Ubuntu 12.04 and the PATH variable is set in the .bashrc
file.
The command java -version
gives an expected out
You might need to edit your eclipse.ini
file and mention the path there. Read this for more details.
EDIT:
-vm
/opt/sun-jdk-1.6.0.02/bin/java
This is how your vm argument should be in the .ini file. If not,change it. Be careful about the path though. Generally Java is installed in /opt,but check once on your system.
Also, look at this question as well.