Eclipse installs the MySQL driver in the project

Source: Internet
Author: User

Copy the Mysql-connector-java-5.1.18-bin.jar package to the Web-inf\lib directory of the project that needs to connect to the MySQL database.

Right-click the project name, build path, Configure build path, Java build path, Libraries

Click the Add External JARs button, pop up the JAR Selection dialog box, specify the location of the Mysql-connector-java-5.1.18-bin.jar package in the dialog box, click OK,

Return to the previous dialog box and click OK again to write the path of the JAR package to the classpath. At this point, a successful installation of the MySQL-deployed driver was installed in the Eclipse project.

Note: If you copy only the jar package to the project's Web-inf\lib directory, Eclipse does not automatically add the jar package to the classpath.

You must use the above steps to add a jar package to the classpath, in which case the jar package can be used by the project.

Eclipse installs the MySQL driver in the project

Related Article

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.