Generating Java Source Code for PL/SQL Programs

To generate Java source code (.java and .sqlj files) for a PL/SQL program, use JPublisher:

  1. Select Viewthen choose Connection Navigator .
  2. Expand Database and select a database connection.
  3. In the database connection, expand a schema.
  4. Expand the node that contains the program or object (each package body is in a node within the Packages node, and each object type body is in the corresponding Object types node).
  5. Right-click the program or object, and choose G enerate Java. The JPublisher wizard opens.
  6. Change any default values or add values to the wizard as needed, especially project and package names, and click OK .
  7. JPublisher generates the files and JDeveloper stores them in the project and package you specify. They are accessible from either the Applications Navigator or System Navigator:

To generate Java source code for a node of PL/SQL programs, use JPublisher:

  1. Select Viewthen choose Connection Navigator .
  2. Expand Database and select a database connection.
  3. Expand the connection, and right-click a node, and choose Generate Java. The JPublisher wizard opens.
  4. Change any default values or add values to the wizard as needed, especially project and package names, and click OK .
  5. JPublisher generates the files and JDeveloper stores them in the project and package you specify. They are accessible from either the System Navigator or Applications Navigator: A single Java file is generated.

Creating, Editing and Using PL/SQL Programs
Accessing Oracle Objects and PL/SQL Packages using Java
About JPublisher