Monday, December 15, 2014

Multiple JDBC Connector file's path set to UBUNTU(Mysql, PostgreSQL)

Multiple JDBC Connector file's path set to UBUNTU(Mysql, PostgreSQL)

For Mysql,
http://zakirrizvi.blogspot.jp/2014/12/mysql-path-set-in-ubuntu.html
or
https://help.ubuntu.com/community/JDBCAndMySQL

For PostgreSQL,
  1. install PostgreSQL
  2. download PostgreSQL's JDBC connector file. Put it in a location(/usr/share/java/) of your computer /usr/share/java/postgresql-9.0-802.jdbc4.jar
Run the command
$ sudo gedit .bashrc

Add this portion:

CLASSPATH=.:/usr/share/java/postgresql-9.0-802.jdbc4.jar
export CLASSPATH
CLASSPATH=$CLASSPATH:/usr/share/java/mysql.jar
export CLASSPATH 

 Check it now:
$ echo $CLASSPATH
.:/usr/share/java/postgresql-9.0-802.jdbc4.jar:/usr/share/java/mysql.jar

N.B:
It is not possible to set multiple connector file in classpath if you want to set in 
 /etc/environment file.
You must have to set it in .bashrc file.
Well wishes to all.

No comments:

Post a Comment