1) Why have you installed Java to /var/www/html ?? It is much better to install programs to /usr/local. /var/www is to do with Apache, AKAIK. I suggest that you move Java to /usr/local.
2) It looks like you have got the JRE. So you will need to set the environment variable JRE_HOME. To do this, open ~/.bash_profile in your favourite text editor. Add the line
Save the file, and then run the command (in an Xterm)
I hope this helps