Creating Java Execution Wrappers

This topic describes the procedure for creating Java execution wrappers in Oracle® Database Navigator.

You can create Java wrappers for executing Java programs stored in Oracle databases using OJVM. A public static method/public static void method can be the entry point for running a Java program on OJVM. Since the Java program is called using an SQL procedure/function, SQL arguments need to be changed to Java arguments, while Java return object must be changed to SQL object. Oracle® Database Navigator (with OJVM support) carries out this conversion by creating Java wrapper method around a public static method.

Follow these steps to create Java execution wrappers around Java methods:

  1. From the DB Browser window, expand the schema containing the Java class file you want to execute.
  2. Right-click the Java class file and select Create Execution Wrapper option from the context menu.

    Create Execution Wrapper option for Java Class

  3. Select the method(s) for which you want to create the wrapper from the dialog box that opens and click OK.


    Select Java Method(s) to create execution wrapper

    The wrapper creation process starts.


    Wrapper creation in progress

    Once the execution wrappers are successfully created, the DB Navigator - Wrapper Result dialog box lists the wrapper objects.


    DB Navigator - Wrapper Results window for Java class

  4. If the system-generated wrapper names exceed the maximum identifier length defined for the database, adjust the names in the DB Navigator - Wrapper Names Editor dialog box that displays in such cases.

    DB Navigator - Wrapper Names Editor window

  5. To create a wrapper directly for a public static method within the Java class file, expand the Methods in the required Java Class and select Create Execution Wrapper option from the context menu of that method.

    Creating Execution Wrapper for Java method

  6. Once the wrappers are successfully created, the DB Navigator - Wrapper Result dialog box lists the wrapper objects for the given method.

    DB Navigator - Wrapper Result window for Java method