• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MySQL Driver, Help!

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, it did the trick!
 
reply
    Bookmark Topic Watch Topic
  • New Topic