@@ -0,0 +1,1512 @@
+package DataBase;%0A%0Aimport com.sleepycat.bind.serial.StoredClassCatalog;%0Aimport com.sleepycat.je.Database;%0Aimport com.sleepycat.je.DatabaseConfig;%0Aimport com.sleepycat.je.DatabaseException;%0Aimport com.sleepycat.je.Environment;%0Aimport com.sleepycat.je.EnvironmentConfig;%0Aimport java.io.File;%0A%0A%0Apublic class DB %7B%0A    %0A    private static final String CLASS_CATALOG = %22java_class_catalog%22;%0A    private static final String STORE = %22store%22;%0A    private Environment env;%0A    private Database facDb;%0A    %0A    private StoredClassCatalog javaCatalog;%0A    %0A    public DB(String dir) throws DatabaseException%7B%0A        EnvironmentConfig envConfig = new EnvironmentConfig();%0A        envConfig.setTransactional(true);%0A        envConfig.setAllowCreate(true);%0A        env = new Environment(new File(dir), envConfig);%0A        %0A        DatabaseConfig dbConfig = new DatabaseConfig();%0A        dbConfig.setTransactional(true);%0A        dbConfig.setAllowCreate(true);%0A        %0A        Database catalogDb = env.openDatabase(null, CLASS_CATALOG, dbConfig);%0A        javaCatalog = new StoredClassCatalog(catalogDb);%0A        facDb = env.openDatabase(null, STORE, dbConfig);%0A    %7D%0A    %0A    public final Environment getEnvironment()%7B%0A        return env;%0A    %7D%0A    %0A    public final StoredClassCatalog getClassCatalog()%7B%0A        return javaCatalog;%0A    %7D%0A    %0A    public final Database getPartDatabase()%7B%0A        return facDb;%0A    %7D%0A    %0A    public void close()%7B%0A        facDb.close();%0A        javaCatalog.close();%0A        env.close();%0A    %7D%0A%7D%0A

Create BD.java