The Java Importer enables you to access the rich environment of the Java programming language from your reports. Using the Java Importer, you can automatically generate PL/SQL packages and procedures to access Java classes and then program with the generated PL/SQL in your reports. The PL/SQL generated by the Java Importer is robust, offering support for the original Java class constructors, methods, and fields.
Beyond simply mapping static methods to PL/SQL functions and procedures, the Java Importer provides support for persistent Java objects, with support for type mapping and array objects.
You can conveniently access the imported Java through the generated PL/SQL
using the ORA_JAVA
built-in
package. Internally, the generated PL/SQL packages use the Java Native Interface
(JNI) standard and an internal JNI package to act as the bridge between PL/SQL
and Java.
Imported Java runs in the middle tier. The corresponding generated PL/SQL package calls into the Java class and the Java methods execute in a dedicated Java Virtual Machine (JVM) on the Reports Server. A dedicated JVM is created for each Reports Server application instance that uses the generated PL/SQL package to call the imported Java.
In Oracle Reports, the Java Importer is represented by the Import Java Classes dialog box that provides you with a way to select or specify the Java classes you wish to make use of in your report. Once you have selected the required Java classes, the Java Importer calls the PL/SQL generator to create a PL/SQL package for each class you have selected. You will use this importer whenever you want to provide access to a Java class to your application. The Java Importer can be run multiple times during a development session as new Java class access requirements are discovered; it is not necessary to identify all the classes needed at once.
Importing a Java Class into PL/SQL
Copyright © 1984, 2005, Oracle. All rights reserved.