Using this workaround it will be possible to use different versions of java (jdk) for different domains and server instances on a single 8.x PE and/or EE installation. Please make sure that the updated jdk is compatible with application server and the application(s) for which it is being updated. Tested on Solaris as of now.
01 Create a copy of the existing asenv.conf and update the AS_JAVA property to point to the new jdk.
create a directory called 'new-config'
copy config/asenv.conf to new-config/asenv.conf
edit asenv.conf and update AS_JAVA property with the desired jdk location
02 Modify the domain/instance specific startserv and stopserv scripts so that they point to new asenv.conf.
Modify the startserv and stopserv scripts in <domain-dir>/bin for domains and <instance-dir>/bin for instances for which the jdk needs to be modified.
for ex. to change the startserv and stopserv scripts for a server instance under node agent.
edit startserv and change the asenv.conf location.
edit stopserv and change the asenv.conf location.
03 Restart the domain/instance to use the updated jdk.
Thanks to Prabhu Velayutham for sharing this work around.