1

In Oracle DB 11.2.0.4, linux 6.7 single instance

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

SQL> show user
USER is "SYS"
SQL> select get_java_property('java.version') from dual;
select get_java_property('java.version') from dual
       *
ERROR at line 1:
ORA-00904: "GET_JAVA_PROPERTY": invalid identifier

I can't find anything on this ORA-00904: "GET_JAVA_PROPERTY": invalid identifier, anyone know why this happens?

This works fine

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

DBMS_JAVA.GET_OJVM_PROPERTY(PROPSTRING=>'JAVA.VERSION')
--------------------------------------------------------------------------------
1.6.0_191

SQL> 

thanks

1

Well, you found it somehow, didn't you?

It was never part of the database officially, it is just some custom function you can find on the Internet. For example: https://stackoverflow.com/questions/28164252/how-to-check-jdk-version-in-oracle

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.