File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mysql-Jar file

 
kashwini Kulkarni
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

Can anyone please suggest me a site from where can i download mysql.jar and also an example that will explain the connection with mysql.



Thanks in Advance
KAshwini
 
Sagar Rohankar
Ranch Hand
Posts: 2904
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're looking for Connector/J, a JDBC driver for MySQL.
http://dev.mysql.com/usingmysql/java/
 
Jijesh T Das
Greenhorn
Posts: 11
 
Jijesh T Das
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class.forName("com.mysql.jdbc.Driver").newInstance();

con = DriverManager.getConnection("jdbc:mysql:///test", "username", "password");
 
Jan Cumps
Bartender
Posts: 2576
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jijesh T Das wrote:Class.forName("com.mysql.jdbc.Driver").newInstance(); ...

Why the call to newInstance() ?
I have seen this popping up in a few answers lately. Where is that coming from?

Check Oracle's jdbc intro,
and the MySQL jdbc intro, listing 4:

Class.forName("com.mysql.jdbc.Driver");
 
kashwini Kulkarni
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thanks to all of you for helping me and guiding me.


Thanks in Advance
Kashwini
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic