The default Java environment in Oracle Solaris 11.2 is Java 7. Oracle Solaris 11.2 also ships with the following versions of Java:
Java 6 Update 75
Java 7 Update 55
Java 8 Update 5
Use the pkg set-mediator command to change the Java version.
Installing the Java 8 packages also sets Java 8 as the default Java environment on the system unless you used the pkg (1) mediator to set an explicit version of Java prior to the installation.