System.err.println("close error: " + tdb.errmsg(ecode));
    }

  }
}
</pre>

<p>The following code is an example to use an abstract database.</p>

<pre style="margin: 0em 0.8em; padding: 0.3em; background: #eeeeff none; border: 1px solid #cccccc; font-size: 90%;">import tokyocabinet.*;

public class TCADBEX {
  public static void main(String[] args){

    // create the object
    ADB adb = new ADB();

    // open the database
    if(!adb.open("casket.tch")){
      System.err.println("open error");
    }

 