private void run(String args[]) throws DatabaseException {
    // Parse the arguments list
    parseArgs(args);

    myDbEnv.setup(
        myDbEnvPath, // path to the environment home
        true); // is this environment read-only?

    // Open the data accessor. This is used to retrieve
    // persistent objects.
    da = new DataAccessor(myDbEnv.getEntityStore());

    // If a item to locate is provided on the command line,
    // show just the inventory items using the provided name.
    // Otherwise, show everything in the inventory.
    if (locateItem != null) {
      showItem();
    } else {
      showAllInventory();
    }
  }
 public static void main(String args[]) {
   ExampleInventoryRead eir = new ExampleInventoryRead();
   try {
     eir.run(args);
   } catch (DatabaseException dbe) {
     System.err.println("ExampleInventoryRead: " + dbe.toString());
     dbe.printStackTrace();
   } finally {
     myDbEnv.close();
   }
   System.out.println("All done.");
 }