Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Steve.

Asked: November 07, 2019 - 5:36 pm UTC

Last updated: November 08, 2019 - 5:20 am UTC

Version: Oracle 10g

Viewed 1000+ times

You Asked

Hi,
We have an Oracle 10g database running java on the database as java stored procedures. It is hosted on an IBM AIX frame. There are both 64bit and 32bit jvms installed. How do you specify the java classpath for java running in the database? We need it to use the 32bit jvm and suspect it is using the 64bit version.
Thanx much

and Connor said...

We don't access Java *outside* the database when you are running within the database. It is self-contained. From the docs:

https://docs.oracle.com/cd/E11882_01/java.112/e10588/chtwo.htm#JJDEV02030


In the standard Java development environment, Java source code, binaries, and resources are stored as files in a file system, as follows:

Source code files are saved as .java files.

Compiled Java binary files are saved as .class files.

Resources are any data files, such as .properties or .ser files, that are stored in the file system hierarchy and are loaded and used at run time.

In addition, when you run a Java application, you specify the CLASSPATH, which is a file or directory path in the file system that contains your .class files. Java also provides a way to group these files into a single archive form, a ZIP or Java Archive (JAR) file.

Both these concepts are different in Oracle Database environment.


Storing Java code, binaries, and resources

In Oracle Database, source code, classes, and resources reside within the database and are known as Java schema objects, where a schema corresponds to a database user. There are three types of Java schema objects: source, class, and resource. There are no .java, .class, .sqlj, .properties, or .ser files on the server. Instead, these files map to the appropriate Java schema objects.

Locating Java classes

Instead of the CLASSPATH, you use a resolver to specify one or more schemas to search for Java source, class, and resource schema objects.


Is this answer out of date? If it is, please let us know via a Comment

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library