PDA

View Full Version : where to place mysql jconnector



baditz
02-14-2006, 09:26 AM
:shock: i've been trying to make a connection from my java program to connect to mysql so far i haven't successfully made it.. i placed mysql-connector-java-3.1.12-bin.jar to /usr/lib/j2se/1.4/jre/lib/ext/ but i have been testing this code

public class DataBase
{
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");
}
}
}

just to see if my connection is working but so far no connection.. CAN ANYONE HELP ME, PLEASE....[/b]