Versions available for this page: CUBRID 8.4.3 | CUBRID 9.0.0 |
You must already have Java installed and the JAVA_HOME environment variable configured in your system. You can download Java from the Developer Resources for Java Technology website (http://java.sun.com). For more information, see Environment Settings for Java Stored Functions/Procedures.
Configuring the environment variables for Windows
After installing Java, right-click [My Computer] and click [System Properties]. In the [Advanced] tab, click [Environment Variables]. The [Environment Variables] dialog will appear.
In the [System Variables], click [New]. Enter JAVA_HOME and Java installation path such as C:Program FilesJavajdk1.6.0_13 and then click [OK].

Of system variables, select Path and then click [Edit]. Add %JAVA_HOME%bin in the [Variable value] and then click [OK].

You can also configure JAVA_HOME and PATH values in the shell instead of using the way described above.
set JAVA_HOME= C:Program FilesJavajdk1.6.0_13
set PATH=%PATH%;%JAVA_HOME%bin
Configuring the environment variables for Linux
Specify the directory path where Java is installed (example: /usr/java/jdk1.6.0_13) as a JAVA_HOME environment variable and add $JAVA_HOME/bin to the PATH environment variable.
export JAVA_HOME=/usr/java/jdk1.6.0_13 //bash
export PATH=$JAVA_HOME/bin:$PATH //bash
setenv JAVA_HOME /usr/java/jdk1.6.0_13 //csh
set path = ($JAVA_HOME/bin $path) //csh
To use JDBC, you should specify the path where the CUBRID JDBC driver is located in the CLASSPATH environment variable.
The CUBRID JDBC driver (cubrid_jdbc.jar) is located in the jdbc directory under the directory of CUBRID installation.

Configuring the CLASSPATH environment variable for Windows
set CLASSPATH=C:CUBRIDjdbccubrid_jdbc.jar:.
Configuring the CLASSPATH environment variable for Linux
export CLASSPATH=$HOME/CUBRID/jdbc/cubrid_jdbc.jar:.
Warning If a general CUBRID JDBC driver has been installed in the same library directory ($JAVA_HOME/jre/lib/ext) where the JRE is installed, it may be loaded ahead of the server-side JDBC driver used by the Java stored procedure, which causing it to malfunction. In a Java stored procedure environment, make sure not to install a general CUBRID JDBC driver in the directory where the JRE is installed ($JAVA_HOME/jre/lib/ext).
Note To get the latest information about JDBC driver, click http://www.cubrid.org/wiki_apis/entry/cubrid-jdbc-driver.