The Oracle Database 12c Java Virtual Machine (JVM) has matured. The following new features are available in this release of the database:
- The internal Oracle JVM is now compatible with Standard Edition of Java 6 by default, and configurable with Java 7.
- Oracle JVM enhancements include support for the loadjava utility, list-based operations with dropjava, the ability to resolve external class references by using the ojvmmtc utility, and increased functionality in the ojvmjava tool.
- Database-resident JAR files have been introduced, which means that when you load a JAR file, you now have the option of creating an object representing the JAR file transparently.
- Metadata can be shared between user-defined classes. This mimics the concept of a multithreaded process control block.
- Two-tier duration for Java session state is now possible. This lets you use Java as previously done in autonomous transactions within a connection, or as a persistent session with preserved state between transactions. You can use the endsession function in the dbms_java package to clear the previous session state on entry. This function preserves any property settings when it clears the session state. You should use the endsession_and_related_state function from the dbms_java package when you want to clear both the session state and property settings.
- Output streams can be redirected externally from the database.
- System properties can be set that are propagated on connection to the database server.
- A Java just-in-time (JIT) compiler reduces Java byte streams directly into machine-specific code, improving performance by eliminating the interpretation phase.
The Java Interactive Interface
The ojvmjava utility is an interactive interface to the session namespace and database instance. From Oracle Database 11g forward, you can launch executables through this tool. A new runjava option lets you run the ojvmjava shell in command mode or resident class mode. The current version of ojvmjava has reduced the stack trace for thrown exceptions. You also can open a new connection without leaving the current ojvmjava session.