PL/Java v11
The PL/Java package provides access to Java stored procedures, triggers, and functions via the JDBC interface. Unless otherwise noted, the commands and paths noted in the following section assume that you have performed an installation with the edb-asxx-pljava
RPM package where xx
is the Advanced Server version number.
Before installing PL/Java for use with a standard Java virtual machine (JVM) on a Linux system, you must first confirm that a Java runtime environment (version 1.8) is installed on your system. Installation of a Java development kit also provides a Java runtime environment.
Installing PL/Java on Linux
The following steps outline the process of installing PL/Java on a Linux system:
Step 1: Edit the postgresql.conf
file located under the data
directory of your Advanced Server installation and add (or modify) the following settings:
Where path_to_pljava.jar
specifies the location of the pljava.jar
file and path_to_libjvm.so
specifies the location of the libjvm.so
file.
For example, the following lists the paths for a default installation with Java version 1.8:
Step 2: Restart the database server.
Step 3: You can use the CREATE EXTENSION
command to install PL/Java. To install the PL/Java extension, login to the database in which you want to install PL/Java with the psql or pgAdmin client, and invoke the following command:
Step 4: To confirm that PL/Java is installed, invoke the following command:
The edb-psql
client displays two rows indicating that java
and javau
(Java Untrusted) have been installed in the database.