Download address required for Java + MySQL + hibernate environment setup

Source: Internet
Author: User

MySQL: http://www.mysql.com/

MySQL JDBC driver: http://dev.mysql.com/downloads/connector/j/5.0.html

Mysql-front: http://www.mysqlfront.de/

Hebernate: http://www.hibernate.org/

Tools related to hebernate: http://sourceforge.net/projects/hibernatesynch/

 

In addition, repost an article connecting to MySQL in Eclipse:

MySQL connection configuration in Eclipse:

1. Download mysql-connector-java-5.0.3

Address: http://www.mysql.org/get/Downloads/Connector-J

2. Download and decompress the archive: libraries of the Project copied by the mysql-connector-java-5.0.3-bin.jar.

The steps are as follows:

First copy the compressed package to the project directory, and then select the configuration item in project explorer, right-click and choose Properties> JAVA build path> libraries> Add jars. The following is a connection example to reference other users. But I have verified it:

Import java. SQL .*;

Public class databasecont {

Public static void main (string [] ARGs ){

Try {

Connection conn; statement stmt; resultset res;

Class. forname ("com. MySQL. JDBC. Driver"). newinstance ();

Conn = drivermanager. getconnection ("JDBC: mysql: // localhost: 3306/test ",

Root ","");

Stmt = conn. createstatement ();

Res = stnt. excutequery ("select * From contact ");

While (res. Next () {string name = res. getstring ("name ");

System. Out. println (name);} res. Close ();

} Catch (exception ex ){

System. Out. println ("erro:" + ex. tostring ());

}

}

}

Note: Do not import com. MySQL. JDBC. Driver to your class because it is already in your libaries.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.