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 View | Connection Navigator .
  2. Expand Database and select a database connection.
  3. In the database connection, expand a schema.
  4. Expand the folder that contains the program or object (each package body is in a folder within the Packages folder, and each object type body is in the corresponding Object types folder).
  5. Right-click the program or object, and choose G enerate Java from the context menu. 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 Application Navigator or System Navigator:

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

  1. Select View | Connection Navigator .
  2. Expand Database and select a database connection.
  3. Expand the connection, and right-click a folder, and choose Generate Java from the context menu. 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 Workspace Navigator or Application 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

 

Copyright © 1997, 2004, Oracle. All rights reserved.