I'm a developer working with multiple customers that use various version of Oracle DB. My question relates to Java UDF (not ODBC).
I was able to build a simple Java program on my Oracle 11 DB server (Redhat, AWS hosted) and use sqlplus command to access the User Defined Functions (UDF). Worked great! Here is a simple code example:
SQL> CREATE OR REPLACE FUNCTION udfversion RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'UDFtest.version() return java.lang.String';
/
SQL> VARIABLE myString VARCHAR2(20);
SQL> CALL udfversion() INTO :myString;
SQL> PRINT myString;
But now my Java program needs to be compiled using JDK11 and I would like to perform the same UDF call. I would like to try this on Oracle 19c DB running on Redhat (my customer's requirements). My question is what are my options for gaining access to Oracle 19c for these types of tests?
Can I use the Oracle cloud portal to setup a 19c DB on a Redhat server, compile my Java-11 test program, and run sqlplus? Or would it be best to get an installer and download it into my Redhat server? What type of license would I need to do this developer-oriented work?
The java version inside the database on 19c is still 1.8 to my knowledge
SQL> SELECT dbms_java.get_jdk_version JDK_Version FROM dual;
JDK_VERSION
-------------------------------------------------------------
1.8.0_291
But the absolute cheapest way is probably to download 18c XE which is free, and has the Java option (plus almost every other option) available within it.
The issue with downloading your own 19c and doing some prototyping, is you *might* be violation of the license terms (which discusses lots of things about whether you are exploring or prototyping or building apps for commercial use etc).
With the cloud, for a one off test, you could probably setup either managed database service or build your own on IaaS, but they'd still need licensing. The free options (autonomous) do not include Java to my knowledge.