Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > MySQL > Mysql & JDBC configuration

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-06-03, 18:19
poojajt poojajt is offline
Registered User
 
Join Date: Sep 2003
Location: CA
Posts: 38
Mysql & JDBC configuration

Hi,
Am writing code for connecting to MYSQL database 'n here is what I've coded...
Class.forName("com.mysql.jdbc.Driver") ;
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/email") ;

Statement stmt = conn.createStatement() ;

As per the documentation of the MYSQL-JDBC driver for Linux u've to
Put mysql-connector-java-3.1.0-alpha-bin.jar in your classpath, either by adding the
FULL path to it to your CLASSPATH enviornment variable, or putting it in $JAVA_HOME/jre/lib/ext....so i copied the file to the /jre/lib... folder but inspite of that I've the foll. error......i.e. it is not able to detect the
driver......
db_test.java:15: unreported exception java.lang.ClassNotFoundException; must be
caught or declared to be thrown
Class.forName("com.mysql.jdbc.Driver") ;
^
1 error

How do i get out of this? Please help asap.
Thanx.
Pooja
Reply With Quote
  #2 (permalink)  
Old 12-25-03, 23:22
BWDRKR2 BWDRKR2 is offline
Registered User
 
Join Date: Dec 2003
Posts: 1
Can't Find Driver

Did you find the solution to find the driver ? I have the same problem.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On