
[id='specifying-external-jdbc-drivers_{context}']
= Specifying external JDBC drivers

When executing an application (either as a hollow JAR or as an uberjar), you can specify a JDBC driver JAR using the `thorntail.classpath` system property.
This way, you do not need to package the driver in the application.

The `thorntail.classpath` property accepts one or more paths to JAR files separated by `;` (a semicolon).
The specified JAR files are added to the classpath of the application.

[discrete]
== Prerequisites

* A JAR file with your application

[discrete]
== Procedure

. In a terminal application, navigate to the directory with your application JAR file.
. Execute your application JAR file using the Java binary and specify the JDBC driver:
+
[source,bash]
----
$ java -Dthorntail.classpath=./h2-1.4.196.jar -jar microprofile-jpa-hollow-thorntail.jar example-jpa-jaxrs-cdi.war
----

