Getting Started
Install the latest version of the Java SE SDK on your computer
java -version
Install your database management system (DBMS) if needed
- MySQL
Install a JDBC driver from the vendor of your database
mysql-connector-java-8.0.21 is pure Java and implement the network protocol for a specific data source. The client connects directly to the data source.
Install Apache Ant
tar zxvf xxxx.tar.gz
export ANT_HOME=~/software/ant/apache-ant-1.9.15
export PATH=$ANT_HOME/bin:$PATH
Downlad the sample code
- JDBCTutorial.zip
Modify the build.xml file
Modify the tutorial properties file
Compile and package the samples
ant jar
Create databases, tables, and populate tables
ant create-mysql-database
ant setup
mysql-connector-xx.jar path start with /
Run the samples
ant runct