7.9.2 Installing PL/Java on Windows
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.
3. Modify the PATH setting used by the edb-postmaster backend (if it runs as a service, you will normally change the System Environment setting) so that it contains the following two entries:%JRE_HOME%\bin;%JRE_HOME%\bin\clientWhere JRE_HOME specifies the installation directory of your Java runtime environment. If you have a Java development kit, substitute the location of $JDK_HOME/jre for JRE_HOME.
4. The easiest method is to use the installation script. To run the installation script, login to the database in which you want to install PL/Java and use the following command to run the script:edb-psql=# \i path_to_PPAS/share/pljava_install.sqlWhere 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 (located in the connectors/jdbc subdirectory under your Advanced Server installation).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.-reinstallReinstalls the Java language and the sqlj procedures. This will effectively drop all jar files that have been loaded.-removeDrops the Java language and the sqlj procedures and loaded jar files.-user user_nameuser_name specifies the name of the user that is connecting to the database. Default is the current user.-password passwordpassword specifies the password of the user that is connecting to the database. Default is no password.-database databasedatabase specifies the name of the database to which to connect. The default value is edb.-host host_namehost_name specifies the name of the host. The default value is localhost.-port port_numberport_number specifies the Advanced Server port number. The default value is 5444.java -cp "/opt/PostgresPlus/connectors\\connectors\\jdbc\\edb-jdbc16.jar;/opt/PostgresPlus/connectors\\lib\\deploy.jar" org.postgresql.pljava.deploy.Deployer -install -user enterprisedb -password password -database edb -host localhost -port 5444Because of the complexity of this command line, we recommend storing the command line in a shell script or a .bat script.