Check Java version used in Oracle Database

Check Java version used in Oracle Database

Check the java JDK version present in Oracle Setup
Go to the Oracle Home directory then java & bin folder and run the following command to check.

E:\oracle\12.1.0\dbhome_1\jdk\bin>java -version
java version "1.6.0_75"
Java(TM) SE Runtime Environment (build 1.6.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 20.75-b01, mixed mode)

Check JDK Version from SQL

SQL> SELECT dbms_java.get_jdk_version JDK_Version FROM dual;


Check Oracle JAVA version from PLSQL code if you don’t have access to direct server

-- Create the jave property function
create function get_java_property(prop in varchar2)
return varchar2 is
language java name 'java.lang.System.getProperty(java.lang.String) return java.lang.String';

-- Select the query
select get_java_property('java.version') from dual;

Error In express edition we did not have java installed. you get following error:

SQL> select get_java_property('java.version') from dual;
select get_java_property('java.version') from dual
ERROR at line 1:
ORA-29538: Java not installed

Check the Operating system Oracle

E:\>java -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

Following version Support the JVM present with Oracle Software

Released Database Java Version
Oracle 18.1 JVM support 1.8 version
Oracle 12.2 JVM support 1.8 version
Oracle 12c JVM Support 1.6 and 1.7 both version
Oracle JVM supports JDK 1.6
Oracle 11g JVM supports JRE 1.5
Oracle 10g JVM supports JRE 1.4
Oracle 9i JVM supports JRE 1.3