Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Linux / UNIX and the fly likes MySQL Driver, Help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "MySQL Driver, Help!" Watch "MySQL Driver, Help!" New topic
Author

MySQL Driver, Help!

Frank Vazquez
Greenhorn

Joined: Oct 13, 2001
Posts: 2
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

Joined: Jun 25, 2001
Posts: 15641
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Frank Vazquez
Greenhorn

Joined: Oct 13, 2001
Posts: 2
Thanks, it did the trick!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MySQL Driver, Help!
 
Similar Threads
confuse on how to set the java_home classpath correctly
JUnit 3.8.1 on Red Hat 7.3
"root" vs. "user defined user"
Problem with installing JUnit on Red Hat
Having some problem with redhat installation