From 81a6a9ecbab69314c9dc17ed176f84938c8cda2e Mon Sep 17 00:00:00 2001 From: Stefan Iliev <46542846+StefanIliev545@users.noreply.github.com> Date: Thu, 12 Sep 2019 10:29:38 +0100 Subject: [PATCH] [CORDA-3079] Load drivers directory automatically (#5454) --- node/capsule/src/main/java/CordaCaplet.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node/capsule/src/main/java/CordaCaplet.java b/node/capsule/src/main/java/CordaCaplet.java index 46450fcc6e..b6b2007577 100644 --- a/node/capsule/src/main/java/CordaCaplet.java +++ b/node/capsule/src/main/java/CordaCaplet.java @@ -112,6 +112,9 @@ public class CordaCaplet extends Capsule { // If it fails, just return the existing class path. The main Corda jar will detect the error and fail gracefully. return cp; } + + // Add additional directories of JARs to the classpath (at the end), e.g., for JDBC drivers. + augmentClasspath((List) cp, new File(baseDir, "drivers")); try { List jarDirs = nodeConfig.getStringList("jarDirs"); log(LOG_VERBOSE, "Configured JAR directories = " + jarDirs);