DZone ForumsDZone Forums  

Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
LinkBack Thread Tools Display Modes

Topic: Eclipse + Connector J + MySQL
Old 07-15-2008, 02:32 PM   #1 (permalink)
Member
 
Join Date: Jul 2008
Posts: 1
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.
int80 is offline   Reply /w Quote -


Thread Tools
Display Modes




All times are GMT -5. The time now is 06:07 PM.