code: private void createOrOpenBDBEnv(String BDBEnvHome) throws Exception {
  		// create the BDBEnvHome directory if it does not exist
  		File BDBEnvHomeDir = new File(BDBEnvHome);
  		if (!BDBEnvHomeDir.isDirectory()) {
  			boolean success = BDBEnvHomeDir.mkdir();
  			if (success) {
  				System.out.println(BDBEnvHome + " directory created.");
  			}
  		} else {
  			System.out.println(BDBEnvHome + " directory exists.");
  		}
  		// configuration of the bdb environment, applies to all dbs in this environment
  		EnvironmentConfig envConf = new EnvironmentConfig();
  		envConf.setAllowCreate(false); // initially we do not allow create
  		envConf.setReadOnly(readOnly);
  		envConf.setTransactional(transactional);
  		envConf.setCacheSize(cacheSize);
  		// Instantiate the Environment. This opens it and also possibly creates it.
  		try {
  			dbEnv = new Environment(BDBEnvHomeDir, envConf);
  			System.out.println("An existing BDB environment was found.");
  		} catch (EnvironmentNotFoundException e) {
  			envConf.setAllowCreate(true);
  			dbEnv = new Environment(BDBEnvHomeDir, envConf);
  			System.out.println("A new BDB environment was created.");
  		}
  
  		// printing information about the BDB environment
  		System.out.println("== BDB environment configuration ===");
  		System.out.println(dbEnv.getConfig());
  		System.out.println("== BDB environment database names ===");
  		List<String> dbNames = dbEnv.getDatabaseNames();
  		for (String dbName : dbNames) {
  			System.out.println(dbName);
  		}
  		System.out.println("");
  	}
docs: This method creates and/or opens the BDB environment in the supplied directory. <br>
  TODO: The configuration can be tuned for being more efficient / less persistent!
  
  @param BDBEnvHome
  The directory where the BDB environment will be created.
  @throws Exception