I just put the driver on classpathwhen the server starts:
classpath=.:/opt/h2/bin/h2.jar:/opt/derby/lib/derby.jar:...
server=org.h2.tools.Server
java -cp ${classpath} ${server} -tcp -web ... &
Alternatively, this is one of the rare times that you can add JARto one of java.ext.dirs. You can see what is available on your platform:
System.out.println(System.getProperty("java.ext.dirs"));
source
share