It is necessary to connect to the database when using JDBC programming, import the jar package is necessary, import the other Jar package method is same, the import method is
Open Eclipse
1. Right-click the project to import the jar package, click Properties
2. Choose Java build path on the left and select libraries on the right.
3. Select Add External jars
4. Select the jar package according to the path
OK, it's okay.
Java connection to MySQL's latest driver package
Http://www.mysql.com/downloads/connector/j
There are two ways to import a jar package, the first is to put the jar package in the project directory, by adding a jar package, the use of relative address, so that the project copy to another computer can also be used
The second method is to import the external jar package, which is the absolute address if the item is to be copied to another computer and re-imported
The first method, it is recommended to use
The second method of
Once added, the following will appear
JDBC Driver jar import Eclipse