Generating Java Source Code for PL/SQL Programs
To generate Java source code (.java and .sqlj
files) for a PL/SQL program, use JPublisher:
-
Select View
Connection Navigator .
-
Expand Database and select a database
connection.
-
In the database connection, expand a schema.
-
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).
-
Right-click the program or object, and choose G
enerate Java. The JPublisher wizard opens.
-
Change any default values or add values to the wizard as needed,
especially project and package names, and click OK
.
-
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:
-
Applications Navigator: Workspace_name
> Project_name > Application Sources >
package_name > object_name.sqlj
-
System Navigator: Workspace_name >
Project_name > object_name.sqlj
To generate Java source code for a node of PL/SQL programs, use
JPublisher:
-
Select View
Connection Navigator .
-
Expand Database and select a database
connection.
-
Expand the connection, and right-click a node, and choose
Generate Java. The JPublisher wizard opens.
-
Change any default values or add values to the wizard as needed,
especially project and package names, and click OK
.
-
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:
-
System Navigator: Workspace_name >
Project_name > object_name.java
-
Applications Navigator: Workspace_name
> Project_name > Application Sources > package_name
> object_name.java
A single Java file is generated.
Related topics
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.