Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 | 



Setting up the JDBC Environment

System Requirements
  • JDK 1.6 or later
  • CUBRID 2008 R1.0 or later
  • CUBRID JDBC Driver 2008 R1.0 or later
Installing and Configuring Java Environment

You must already have Java installed and the JAVA_HOME environment variable set on your system. To install Java, download it from the Java homepage (http://java.sun.com). For more information, see Environment Settings for Java Stored Functions/Procedures.

Configuring Envrionment Variables for Windows

After installing JAVA, double click [My Computer] and click [System Properties]. In the [Advanced] tab, click [Envrionment Variables]. The [Environment Variables] dialog will appear.

In the [System Variables], click [New]. Enter JAVA_HOME and Java installation path such as C:\Program Files\Java\jdk1.6.0_16 and then press [Enter].

gs_app_jdbc_setting_javahome.png

Select "Path" and then click [Edit]. Add %JAVA_HOME%bin to the variable and then click [OK].

gs_app_jdbc_setting_path.png

You can configure JAVA_HOME and PATH in the shell.

set JAVA_HOME= C:\Program Files\Java\jdk1.6.0_16

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_16) in the JAVA_HOME environment variable, and add $JAVA_HOME/bin to the PATH environment variable. 

export JAVA_HOME=/usr/java/jdk1.6.0_16     //bash

export PATH=$JAVA_HOME/bin:$PATH           //bash

 

setenv JAVA_HOME /usr/java/jdk1.6.0_16     //csh

set path = ($JAVA_HOME/bin $path)          //csh

JDBC Driver Setting

To use the JDBC, set your CLASSPATH environment variable to the path where the CUBRID JDBC driver is located.

The CUBRID JDBC driver (cubrid_jdbc.jar) is located in jdbc directory which is subdirectory where CUBRID is installed.

img2.png

Configuring the CLASSPATH Environment Variables for Windows

set CLASSPATH=%CUBRID%jdbccubrid_jdbc.jar:.

Configuring the CLASSPATH Environment Variables for Linux

export CLASSPATH=$HOME/CUBRID/jdbc/cubrid_jdbc.jar:. 

Note If a CUBRID JDBC driver has been installed in the same library directory ($JAVA_HOME/jre/lib/ext) where the JRE is located, it may be loaded ahead of the server-side JDBC driver used by the Java stored procedure, causing it to malfunction. In a Java stored procedure environment, make sure not to install the generic CUBRID JDBC driver in the directory where the JRE is installed ($JAVA_HOME/jre/lib/ext).