DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Eclipse + Connector J + MySQL
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jul 2008
Default Eclipse + Connector J + MySQL - 07-15-2008, 03:32 PM

I'm trying to get MySQL and Eclipse with connector j to work. I've installed MySQL 5.0.x and it's all working well, but I don't know where to put the connector-J.xxx.jar file so I can start using it all. I've followed a few tutorials and put the jar file in the path etc. (set CLASSPATH=<PATH TO CJ>) and copied a copy of CJ into c:\<PATH to Java install>\lib\ext. But I'm not sure if I need to do something special for eclipse.

I'm using win32.

Code:
public class Simi {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			System.out.println("Good to go!");
		} catch (Exception E) {
			System.out.println("JDBC Driver Error!");
			
		}

	}

}
This is a test program to see if it's all working.....and, it's not:

"JDBC Driver Error!".

I'm not sure what to do. Or even where to start. Thanks in advance.
Reply With Quote
Reply

Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up mysql datasource for webapplication gk102123 Eclipse 0 12-10-2008 04:46 PM
No tables/views/procedures viewable from MySQL? secristrc NetBeans 0 10-28-2008 01:36 AM
MySQL Maria: How quickly will you start to experiment? rick MySQL 1 07-21-2008 01:06 PM
Retrieve data from excel to store in mysql neelakannan MySQL 0 06-09-2008 06:55 AM
Benchmarks MySQL vs. Oracle 10 bubujake MySQL 0 02-23-2008 10:17 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com