O'Reilly logo

Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ by Dan Scott, George Baklarz, Paul C. Zikopoulos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Apache Derby Applets

You can create a Java applet that includes access to an Apache Derby database. To make this work, the applet must use a network driver to connect to the database. In addition, Apache Derby needs to be started as a network database.

The following example is an applet that retrieves the title and the start and end dates of all the productions running at the YMLD Theater:

 01 public class DERBYAPPLT extends Applet { 02 Connection conn = null; 03 public void init() { try { 04 String url = "jdbc:derby:net://localhost/YMLD:user=APP;password=APP;"; 05 Class.forName("com.ibm.db2.jcc.DB2Driver"); conn = DriverManager.getConnection(url); } catch(Exception e) { e.printStackTrace(); } } public void paint(Graphics g) { try { Font font ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required