There may be more than one version of JAVA installed on the server but the server will use only one. To find the JAVA version used by WebSphere Application Server (WAS) see the SystemOut.log
Find JAVA Version used by WAS using SystemOut.log
Navigate to the folder where SystemOut.log log is available in my case it is available at the below location:
/opt/IBM/WebSphere/AppServer/profiles/Profile01/logs/Mem01
Open the SystemOut.log file and search for the below lines containing the JAVA version. In this case, WAS version is 8.5.5.0 and JAVA SDK 6 is being used by the WAS
************ Start Display Current Environment ************
WebSphere Platform 8.5.5.0 [ND 8.5.5.0 gm1319.01] running with process name Cell01\PCPEPSRAPPNode01\Mem01 and process id 11377
Host Operating System is Linux, version 2.6.32-642.el6.x86_64
Java version = 1.6.0, Java Compiler = j9jit26, Java VM name = IBM J9 VM
was.install.root = /opt/IBM/WebSphere/AppServer
user.install.root = /opt/IBM/WebSphere/AppServer/profiles/Profile01
Java Home = /opt/IBM/WebSphere/AppServer/java/jre
ws.ext.dirs = /opt/IBM/WebSphere/AppServer/java/lib:/opt/IBM/WebSphere/AppServer/profiles/Profile01/classes:/opt/IBM/WebSphere/AppServer/classes:/opt/IBM/WebSphere/AppServer/lib:/opt/IBM/WebSphere/AppServer/installedChannels:/opt/IBM/WebSphere/AppServer/lib/ext:/opt/IBM/WebSphere/AppServer/web/help:/opt/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = /opt/IBM/WebSphere/AppServer/profiles/Profile01/properties:/opt/IBM/WebSphere/AppServer/properties:/opt/IBM/WebSphere/AppServer/lib/startup.jar:/opt/IBM/WebSphere/AppServer/lib/bootstrap.jar:/opt/IBM/WebSphere/AppServer/lib/jsf-nls.jar:/opt/IBM/WebSphere/AppServer/lib/lmproxy.jar:/opt/IBM/WebSphere/AppServer/lib/urlprotocols.jar:/opt/IBM/WebSphere/AppServer/deploytool/itp/batchboot.jar:/opt/IBM/WebSphere/AppServer/deploytool/itp/batch2.jar:/opt/IBM/WebSphere/AppServer/java/lib/tools.jar
Java Library path = /opt/IBM/WebSphere/AppServer/lib/native/linux/x86_64/:/opt/IBM/WebSphere/AppServer/lib/native/linux/x86_64/:/opt/IBM/WebSphere/AppServer/java/jre/lib/amd64/compressedrefs:/opt/IBM/WebSphere/AppServer/java/jre/lib/amd64:/opt/IBM/WebSphere/AppServer/lib/native/linux/x86_64/:/opt/IBM/WebSphere/AppServer/bin:/opt/IBM/WebSphere/AppServer/nulldllsdir:/usr/lib:
Orb Version = IBM Java ORB build orb626-20130112.01
************* End Display Current Environment *************
Note: WebSphere Application Server ND 8.5.5.0 running on Linux server.