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. Open command prompt and enter “java –version”. If installed version number is displayed.
The latest version of Java is Java 18 or JDK 18 released on March, 22nd 2022 (follow this article to check Java version on your computer).
Oracle 12c includes SQL Devloper 3.2 I believe, so presumably includes JDK 6. They supply the old version of SQL Developer, so they also supply a matching, compatible version of the JDK, even if Java had moved on since that version of SQL Developer. The current version, SQL Developer 4.1, requires JDK 8.
Type "java -version" into the Command Prompt, then press Enter on your keyboard. After a moment, your screen should display the information your computer has about Java, including what version you have installed.
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:oracle12.1.0dbhome_1jdkbin>java -version
Below is from Java Developers’ Perspective on Oracle Database 11g under "Portability: Java Standards Support" section The Oracle database 11g JDBC comes in two flavors: ojdbc5.jar for Java 5 (i.e., JDK 1.5) and ojdbc6.jar for Java 6 (i.e., JDK 1.6).
Differences between Oracle JDK and OpenJDK 0 ORA-00932: inconsistent datatypes: expected TIMESTAMP got TIMESTAMP 0 How to define a constant in oracle? 1 Alter table in Oracle 10G - virtual column 2 Query works on a version of oracle but not on other
To find the Java version in CMD, follow the steps given below: Step 1: Open the Command Prompt by pressing Windows Key + R, type cmd and press enter key or click on the Ok button. It opens the Command Prompt window.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With