7.9 PL/Java

Table of Contents Previous Next



1.
Edit the postgresql.conf file and add (or modify) the following settings:
pljava.classpath='path_to_PPAS/lib/pljava.jar'
Where path_to_PPAS specifies the location of the Advanced Server installation.
{ export LD_LIBRARY_PATH= <<path_to_libjvm.so>>:$LD_LIBRARY_PATH }
Where path_to_libjvm.so specifies the location of the libjvm.so file. After saving the file, restart the server; for information about controlling the service, see Section 5.
edb-psql=# \i path_to_PPAS/share/pljava_install.sql
Where path_to_PPAS specifies the location of the Advanced Server installation.
Alternatively, you can use the PL/Java Deployer application. When invoking the Deployer application, you must specify a classpath that includes the deploy.jar file (by default, located in the lib subdirectory under your Advanced Server installation) and the edb‑jdbc1x.jar file (by default, located in the /opt/PostgresPlus/connectors/jdbc directory).
The deploy.jar file contains the code for the deployer command; the edb‑jdbc1x.jar file includes the EnterpriseDB JDBC driver. Use the following command to invoke the Deployer application:
java -cp your_classpath org.postgresql.pljava.deploy.Deployer [options]
Where your_classpath specifies the search path to the compiled classes.
You can include the following options when invoking the Deployer application:
Installs the Java language and the sqlj procedures. The deployer will fail if the language is already installed.
-reinstall
Reinstalls the Java language and the sqlj procedures. This will effectively drop all jar files that have been loaded.
-remove
Drops the Java language and the sqlj procedures and loaded jar files.
-user user_name
user_name specifies the name of the user that is connecting to the database. Default is the current user.
-password password
password specifies the password of the user that is connecting to the database. Default is no password.
-database database
database specifies the name of the database to which to connect. The default value is edb.
-host host_name
host_name specifies the name of the host. The default value is localhost.
-port port_number
port_number specifies the Advanced Server port number. The default value is 5444.


Table of Contents Previous Next