• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL Driver, Help!

 
Frank Vazquez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how my .bash_profile looks:
------------------------------------
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/usr/j2sdkee1.3/bin:/usr/java/jdk1.3.1_01/bin:/usr/local
BASH_ENV=$HOME/.bashrc
USERNAME=""
CLASSPATH=$CLASSPATH:/home/fvazquez/mysql_jdbc_driver
export USERNAME BASH_ENV PATH CLASSPATH
-----------------------------------------------------------
I have "mm.mysql-2.0.4-bin.jar" in :/home/fvazquez/mysql_jdbc_driver. When I run Test.class to connect to MySQL database it throws an error message "could not load JDBC driver: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver". Please Help!
Frank
 
Tim Holloway
Saloon Keeper
Posts: 18302
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CLASSPATH=$CLASSPATH:/home/fvazquez/mysql_jdbc_driver/mm.mysql-2.0.4-bin.jar - class files will be picked up implicitly, jar files will not.
 
Frank Vazquez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, it did the trick!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic