To be able to use JDBC you need to have the JDBC driver of your database on the class path of your application.
There are multiple ways to connect to a database, but the common ways are to either use the java.sql.DriverManager, or to configure and use a database specific implementation of javax.sql...