Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old November 26th, 2002, 04:42 PM
H@voc_!nc.'s Avatar
H@voc_!nc. H@voc_!nc. is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Belgium
Posts: 39 H@voc_!nc. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 48 sec
Reputation Power: 8
Send a message via ICQ to H@voc_!nc.
JDBC & mysql

error message I get
Quote:
Error connecting to database!
ClassNotFoundException throws:com.mysql.jdbc.Driver

source:
PHP Code:
try{
                        Class.
forName("com.mysql.jdbc.Driver");
                        
this.conDB DriverManager.getConnection(this.strUrl);
                }catch(
ClassNotFoundException e){
                        
System.out.println("Error connecting to database!\n\tClassNotFoundException throws:" e.getMessage());
                }catch(
SQLException e){
                        
System.out.println("Error connecting to database!\n\tSQLException throws:" e.getMessage());
                } 
__________________
With Your Hand On A Hot Stove, Fifteen Seconds Can Seem Like Fifteen Minutes. Fifteen Minutes Can Seem Fifteen Seconds When You Are With A Beautiful Woman. That's The Theory Of Relativity

-- Albert Einstein \\

Last edited by H@voc_!nc. : November 28th, 2002 at 01:54 PM.

Reply With Quote
  #2  
Old November 27th, 2002, 04:43 AM
H@voc_!nc.'s Avatar
H@voc_!nc. H@voc_!nc. is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Belgium
Posts: 39 H@voc_!nc. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 48 sec
Reputation Power: 8
Send a message via ICQ to H@voc_!nc.
It is (has been) solved

When Using Jbuilder (like I do)
Project Properties > paths >requires libraries
add.. --> mysql-driver

(I reckon java -cp /path/to/driver.jar should work fine 2 not shure about this!!)

I am getting there

Reply With Quote
  #3  
Old December 6th, 2002, 03:58 PM
Shocka's Avatar
Shocka Shocka is offline
dont click here
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 409 Shocka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 35 m
Reputation Power: 7
Quote:
Originally posted by H@voc_!nc.
It is (has been) solved


(I reckon java -cp /path/to/driver.jar should work fine 2 not shure about this!!)

I am getting there



that will work. Another option is to put the jar file in the same folder as the class files.. a cheap way of gettin around it but it works.

I do this when im programming at school and my source has to mve from one machine to another w/o JBuilder.

Reply With Quote
  #4  
Old December 7th, 2002, 08:22 AM
H@voc_!nc.'s Avatar
H@voc_!nc. H@voc_!nc. is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Belgium
Posts: 39 H@voc_!nc. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 48 sec
Reputation Power: 8
Send a message via ICQ to H@voc_!nc.
did that 2 now

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > JDBC & mysql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway