Autonomous Database supports Oracle JVM.
Oracle JVM is a standard, Java-compatible environment that runs any pure Java
application.
Oracle JVM is compatible with the standard JLS and the JVM specifications. It supports
the standard Java binary format and the standard Java APIs. In addition, Oracle Database
adheres to standard Java language semantics, including dynamic class loading at run
time.
Enable Oracle Java Use DBMS_CLOUD_ADMIN.ENABLE_FEATURE to enable Oracle Java on Autonomous Database.
Check Oracle Java Version You can check the Oracle Java version and the component registry for information on Oracle Java in the Autonomous Database instance.
After you restart the Autonomous Database instance, the Java installation proceeds for some time after the
database starts. See Check Oracle Java Version to verify that Oracle JVM is enabled and the installation is
complete.
Load Java classes and JAR Files into Autonomous Database 🔗
You can use
the client-side loadjava option to load Java classes and JAR files into
Oracle JVM on an Autonomous Database
instance.
The client-side loadjava option is supported as
follows:
The JDK opens the JAR file.
The client-side opens a communication channel with the Autonomous Database.
The Java code is submitted to the Oracle JVM running on the Autonomous Database for loading.
This process is similar to creating a dynamic Java stored procedure from SQL code,
where no file access is involved, but the code gets created.
Note the following:
The Java code you load cannot invoke any operating system or network
calls.
Use of server-side loadjava, that is calls to
the procedure dbms_java.loadjava is not supported. The
procedure dbms_java.loadjava accesses the file system of
the database server where the Oracle JVM runs. This is not allowed on Autonomous Database and calls to
the procedure dbms_java.loadjava from within your Java
application are not supported.
Provides
notes for using Oracle Java on Autonomous Database.
You cannot disable Oracle Java after it is enabled on the Autonomous Database instance.
Autonomous Database
performs Oracle Java patching, as required, during the regular Autonomous Database maintenance
window.
During Oracle Java patching, Java is not available and users could
get an error similar to the following:
ERROR at line 1:
ORA-29548: Java system class reported: release of Java system classes in the
database (19.0.0.0.220118 1.8) does not match that of the oracle executable
(19.0.0.0.220419 1.8).
During the maintenance window, when the Java patching phase is active
there is no response for Java session calls or you see the
ORA-29548 error. After the maintenance window completes,
Java usage is restored.
You can use the events NewMaintenanceSchedule and
ScheduledMaintenanceWarning to be notified of Oracle Java
patching. See Information Events on Autonomous Database for more information.