This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC-Mysql relation

 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both seem to be working fine..
<p> <b>Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Class.forName("com.mysql.jdbc.Driver").newInstance();
</b>
</p>
but guess only one should work, which is the older version then?
Regards,
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that the org.gjt.mm.... was for the MMSQL Driver that has now been changed to the Connector/J Driver which uses the com.mysql.jdbc....
You probably have both drivers in your classpath, therfor both are able to resolve???
DO you know what Driver you are using?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Coma,
The MM distribution has stopped, so the short answer is use the com.mysql.jdbc.Driver driver.
Now, make sure you have the latest stable version of the com.mysql.jdbc.Driver by looking at the MySQL Connector/J page.
By the way, last version to-date is 2.0.14.
Cheers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic