From the Javadocs DriverManager :
As part of its initialization, the DriverManager class will attempt to load the driver classes specified in the "jdbc.drivers" system property. This allows the user to configure the JDBC drivers used by their applications. For example, in the ~ / .hotjava / properties file, you can specify:
jdbc.drivers=foo.bah.Driver:wombat.sql.Driver:bad.taste.ourDriver
This means that a system property must be specified. He does not say that the class will automatically populate this property when registering the driver.
As to why your application is running, you can check that you are already calling the DriverManager#registerDriver() method (although this is not required for most drivers). If so, the driver is registered. Otherwise, the application may have a service provider file, as indicated:
The DriverManager getConnection and getDrivers have been extended to support the Java Standard Edition service provider engine. JDBC 4.0 drivers must include the META-INF/services/java.sql.Driver file. This file contains the JDBC driver name for java.sql.Driver. For example, to load my.sql.Driver class , the META-INF/services/java.sql.Driver my.sql.Driver class file would contain the entry:
source share