How to check JDK version in Oracle?

↘锁芯ラ 提交于 2019-12-04 16:22:59

问题


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.


回答1:


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



回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/28164252/how-to-check-jdk-version-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!