The class that loads
If your application runs on JDK 6 or higher, you do not need to do any of the following. The driver will load automatically when your application asks for its first connection.
Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); Class.forName("org.apache.derby.jdbc.ClientDriver");
The recommended way to load the driver class.
With the embedded driver, if your application shuts down Derby or calls the DriverManager.unload method, and you then want to reload the driver, call the Class.forName().newInstance() method to do so:
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
new org.apache.derby.jdbc.EmbeddedDriver(); new org.apache.derby.jdbc.ClientDriver();
Same as using Class.forName(), except that it requires the class to be found when the code is compiled.
Class c = org.apache.derby.jdbc.EmbeddedDriver.class; Class c = org.apache.derby.jdbc.ClientDriver.class;
This is also the same as using Class.forName(), except that it requires the class to be found when the code is compiled. The pseudo-static field class evaluates to the class that is named.
To set a system property, you alter the invocation command line or the system properties within your application. It is not possible to alter system properties within an applet.
The actual driver that gets registered in the DriverManager to
handle the jdbc:derby: protocol is not the class org.apache.derby.jdbc.EmbeddedDriver
or org.apache.derby.jdbc.ClientDriver;
that class simply detects the type of
The only supported way to connect to a