0

Curiously reading the javadoc of DriverManager, I saw this:

As part of its initialization, the DriverManager class will attempt to load available JDBC drivers by using: The jdbc.drivers system property[...].

src:https://docs.oracle.com/javase/10/docs/api/java/sql/DriverManager.html

What is a system property? It means nothing to me, where on my IDE (eclipse for example?) can I lookup those "system properties"? Are they related to the compiler? So naturally, if I knew what was such a "system property" I would know where to find that "jdbc.driver" system property.

The root of these questions is: because the DriverManager class doesn't need class.forname(Driver) to loads drivers anymore, so how am I sure that when I add my driver to the buildpath of my project DriverManager will find it? Does this "system property" gets updated automatically?

Mark Rotteveel
  • 82,132
  • 136
  • 114
  • 158
Sheed
  • 472
  • 2
  • 10
  • 1
    "*What is a system property*" - https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html – a_horse_with_no_name Nov 13 '18 at 21:15
  • It probably means the properties exposed by [`java.lang.System`](https://docs.oracle.com/javase/10/docs/api/java/lang/System.html) – MadProgrammer Nov 13 '18 at 21:15
  • 3
    A driver can also be loaded via the "service location mechanisms", see [JDBC Class.forName vs DriverManager.registerDriver](https://stackoverflow.com/questions/5484227/jdbc-class-forname-vs-drivermanager-registerdriver) for more details. – MadProgrammer Nov 13 '18 at 21:19
  • Please don't add things like `[solved]` to titles. – Mark Rotteveel Nov 14 '18 at 16:25
  • I just leave it like so? That won't gives readers the understanding my problem found a solution – Sheed Nov 16 '18 at 10:01

0 Answers0