Load the class directly from Java code using the static method Class.forName. For example:

Class.forName("org.apache.derby.jdbc.EmbeddedDriver");

For more details, see "java.sql.Driver" in the Derby Reference Manual.

Once the Derby JDBC driver class has been loaded, you can connect to any Derby database by passing the embedded connection URL with the appropriate attributes to the DriverManager.getConnection method.