well, it loads the Driver :-)
ok, here is my shot at it:
if you run this code:
then you will see following output:
Now Executing main()
Now intializing Driver properties
when calling Class.forName("foo.bar.Baz") then you create an instance of java.lang.Class (not an instance of the class foo.bar.Baz). This Class object "specifies" the foo.bar.Baz class. From it you could create new instances with the newInstance() method or trough other reflection techniques. But the important thing is that when you create a Class file, its stastic blocks are executed. I think (never checked the source code of a
JDBC driver) this is what happens in your JDBC drivers. DB/Driver specific properties are set and initialized....
pascal
[ December 30, 2004: Message edited by: pascal betz ]