When you are programming with JDBC, you need to connect to the database, import the jar package is necessary, import other jar package methods as well, the import method is
Open Eclipse
1. Right-click the project to import the jar package, point properties
2. Select Java build path on the left, select libraries on the right
3. Choose Add External Jars
4. Select the jar package according to the path of the
Make sure it's done.
Java connection MySQL's latest driver package download address
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's directory, by adding a jar package, is using a relative address, so that the project copied to another computer can also be used
The second method is to import the external jar package, which is an absolute address, if the project is to be copied to another computer and then re-import
The first method, the recommended use of
The second method
The following will appear after you add