Skip to content

Instantly share code, notes, and snippets.

@lebesnec
Created February 10, 2009 15:12
Show Gist options
  • Save lebesnec/61417 to your computer and use it in GitHub Desktop.
Save lebesnec/61417 to your computer and use it in GitHub Desktop.
public static final String DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
public static final String PROTOCOL = "jdbc:derby:";
public static final String DATABASE_NAME = "myGreatDatabase";
private Connection connection = null;
private void () {
try {
Class.forName(DRIVER).newInstance();
connection = DriverManager.getConnection(PROTOCOL + DATABASE_NAME + ";create=true");
} catch (Exception e) {
e.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment