if ( config == null ) {
throw new Exception( "Unable to find /derby.properties in classpath" );
}
derbyProps.load( config );
final DatabaseEmbedder db;
File dbHome = new File( "../data" );
if ( !dbHome.exists() ) {
throw new FileNotFoundException( "../data" );
}
if (!derbyProps.isEmpty()) {
db = new DatabaseEmbedder( dbHome, derbyProps );
} else {
db = new DatabaseEmbedder( dbHome );
}
db.start();
System.out.println( "Embedded database started" );
return db;
}