The introduction of Java into the Forms programming environment increases the power and flexibility of your applications. You can use Java and Forms together to.
A Pluggable Java Component (PJC) can be thought of as a substitute or customization for a default Forms client component. Forms provides Java classes that define the appearance and behavior of standard client components: buttons, text areas, radio groups, and so on. When you create a PJC, you write your own Java code to extend the functionality of one of the provided classes. For example, to aid a blind or low-vision user, you could extend the button component class to return an audio response when it is pressed.
To create a PJC, use the PJC Wizard that is included with Oracle Forms or Oracle JDeveloper that is part of Oracle Developer Suite. If you download JDeveloper from OTN, you'll have also to download the PJC Wizard and place it in your JDeveloper installation.
The PJC Wizard that can access all of the Forms component classes. In the wizard, choose the class of the Forms component that you want to customize, and Oracle JDeveloper generates the skeleton code. All you have to do is add your own code to the file, defining the functionality you want, and include the file in your form.
You have to make the jdev-rt.jar from JDeveloper available to the Forms client if your Form uses PJCs created using Oracle JDeveloper. Alternatively, you could extract oracle\jdeveloper\pjc\BeanWrapper.class & oracle\jdeveloper\pjc\TypeConverter.class from jdev-rt.jar and bundle them in a Jar file along with their PJC classes and make this Jar available to the Forms client.
In addition to extending the standard Forms components, you can also create PJCs that will include Java Swing UI components in your form. PJCs also support JavaBeans. This lets you add even more complex components and functionality to your Form.
You can include JavaBeans as custom Java UI components in your form. In previous releases, using a JavaBean inside of a Forms application required you to write a special layer of code to facilitate communications between the Form components and the JavaBean. Oracle Forms now makes it easier for your application to communicate with the JavaBean.
Enhanced JavaBean support registers the properties and methods of a JavaBean at runtime and makes them available to you from PL/SQL in your Forms application on the middle-tier. To interact with the JavaBean in your application, Forms provides Built-ins within a new PL/SQL package.
The Java Importer allows you to access the rich environment of the Java programming language from your Forms applications that run in the middle tier. Using the Java Importer, you can automatically generate PL/SQL packages and procedures that correspond to the Java classes you want to access. These packages and procedures allow you to create and use Java objects directly in your Forms applications. This is achieved by the PL/SQL language facilities provided by Oracle Forms and the runtime services provided by Oracle Forms Server.
Imported Java runs in your middle tier applications. 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 Forms Server. A dedicated JVM is created for each Forms Server application instance that uses the generated PL/SQL package to call the imported Java.
JDAPI (Java Design-time API) is a Java 2 API for programmatically loading, creating, manipulating, saving and compiling Oracle Forms applications. JDAPI is a complementary tool to the Form Builder and can be used to programmatically accomplish anything which can be achieved visually using the Builder.
By using JDAPI you can create utility programs to perform actions on a large number of forms automatically. For example, you could write a servlet which takes a named Forms application and publishes information about it, such as its external dependencies, to the web. You could also write a utility that would search for and replace a string, or some property value, that might appear on a large number of forms.