简体   繁体   中英

How to check JDK version in Oracle?

We have a Java class within our Oracle DB and recently one line of code in that java class is throwing an error:

static BASE64Encoder B64 = new BASE64Encoder();

We are seeing error

java.lang.ExceptionInInitializerError

on this line of code.

I am not sure what has changed on the DB side as we don't have SYS privileges or access to host.

I wish to check the JDK version running our Oracle DB --

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.

Thank you.

SELECT  dbms_java.get_ojvm_property(PROPSTRING=>'java.version') FROM dual

solution 1) on the database host

cd $ORACLE_HOME/jdk/bin
java -version

solution 2) create a PL/SQL function to return Java system properties

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';

And the run a select for the Java version

select get_java_property('java.version') from dual;

solution 3) check the answer from SteveK

Certified versions are:

Oracle 12.2 / 18.1 JVM is 1.8

The Oracle 12c database embedded JVM supports JDK 1.6 and 1.7

The Oracle 11g >= 11.2.0.4 database embedded JVM supports JDK 1.6

The Oracle 11g database embedded JVM supports JRE 1.5 .

The Oracle 10g database embedded JVM supports JRE 1.4 .

The Oracle 9i database embedded JVM supports JRE 1.3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM