## Connecting to the Database Instance

### Use

You have two options for connecting a Java application with a MaxDB database instance using JDBC:

● You can use the java.sql.DriverManager.getConnection method (included in the Java platform).

● You can use the com.sap.dbtech.jdbcext.DataSourceSapDB class (contained in sapdbc.jar).

SAP customers can set up an SSL connection between the database application and the database instance.

### Prerequisites

● You have loaded the JDBC driver.

● You have started the X Server (see X Server, Starting the X Server)

You have to start the X Server even if the Java application and the database instance are on the same computer.

### Example

Examples: Connecting to the Database Instance