Download the desired Java SDK (not the JRE) and install it on your system, if you have not already done so.
The Java SDK can be downloaded from http://www.oracle.com/technetwork/java/javase/overview/index.html.
Start the domain for which you want to change the JDK:
as-install/bin/asadmin start-domain domain-name |
Log in to the Admin console and change the JVM attributes for the domain.
In particular, you may want to change the JAVA_HOME variable on the JVM Settings page for the domain.
Alternatively, you can use the asadmin command:
as-install/bin/asadmin set "server.java-config.java-home=path-to-java-home" |