Java installation for Linux

Centos 6.7 has Java 1.7 version. So you don't need to install Java.
If it is necessary, you need to set JAVA_HOME or JRE_HOME on shell environment.

Setup hostname

You need to setup host name for Java.

Ref. http://www.oracle.com/technetwork/java/index.html

* Java is Oracle's trademark.