How to Set Up your Environment
This section contains information about proper configuration for use of the PSQL Java interface.
Supported JDKs
The PSQL Java interface supports JDKs 1.4 and higher.
CLASSPATH Environment Variable
The PSQL SDK configuration needs the CLASSPATH variable to point to the PSQL classes.
The sample CLASSPATH assumes that PSQL was installed to file_path\PSQL. The Java Class Library SDK is installed to file_path\PSQL\SDK\JCL. For default locations of PSQL files, see Where are the PSQL files installed? in Getting Started With PSQL.
You should update your CLASSPATH environment variable as follows:
SET CLASSPATH=.; file_path\PSQL\bin\psql.jar;
file_path\PSQL\SDK\JCL\Samples\PVideo\pvideoj.jar;
file_path\PSQL\SDK\JCL\Samples\PVideo;
where file_path equals the installation location of PSQL.
Windows CLASSPATH
If you receive an error that a certain PSQL class file cannot be found, your user CLASSPATH variable in the Control Panel may be overriding the system CLASSPATH variable that contains the PSQL paths.
To verify your Windows setup (and correct if necessary):
1
Click Start, point to Settings, and then Control Panel.
2
3
Select the Environment tab.
4
Your PSQL paths are contained in the system variable. Under User Variables, see if CLASSPATH is present. If it is not, no action is required. If it is, prepend %CLASSPATH%; to your user variable.