Getting Started

This topic will give you some start information about db4o and will help you to get your environment ready to work with db4o.

Download Contents

Java Platform

The db4o Java distribution comes as one zip file, db4o-X.X-java.zip. You will have to extract the contents to any folder before starting to use db4o.

db4o-X.X/doc/reference 

contains reference documentation, which you are reading. 

In addition to it you will find the following docs in your distribution:

db4o-X.X/doc/tutorial/index.html

This is the interactive "formula-1" HTML tutorial. Examples can be run "live" against a db4o database from within the browser. In order to use the interactive functionality a Java JRE 1.3 or above needs to be installed and integrated into the browser. Java security settings have to allow applets to be run.

It is recommended to take a first quick "drive" with "formula-1" before studying other db4o documents.

db4o-X.X/doc/tutorial/db4o-X.X-tutorial.pdf

The PDF version of the tutorial allows best fulltext search capabilities.

db4o-X.X/doc/api/index.html

The API documentation for db4o is supplied as JavaDocs HTML files. While you read through this documentation it may be helpful to look into the API documentation occasionaly.

Additional online resources are available here: http://developer.db4o.com/Resources

The db4o Engine

The java version of db4o object database engine consists of one single jar file.This is all that you need to program against. The versions supplied with the distribution can be found in db4o-X.X/lib/.

db4o-X.X-java1.1.jar

will run with most Java JDKs that supply JDK 1.1.x functionality such as reflection and Exception handling. That includes many IBM J9 configurations, Symbian and Savaje.

db4o-X.X-java1.2.jar

is built for all Java JDKs between 1.2 and 1.4.

db4o-X.X-java5.jar

is built for Java JDK 5.

Security Requirements On Java Platform reviews db4o jar security permissions requirements.

Installation 

Java Installation

If you add one of the above db4o-*.jar files to your CLASSPATH, db4o is installed. In case you work with an integrated development environment like Eclipse  you would copy the db4o-*.jar to a /lib/ folder under your project and add db4o to your project as a library. (You only need to copy the one jar file for the distribution you are targeting.)

Here is how to add the db4o library to an Eclipse project

  • create a folder named "lib" under your project directory, if it doesn't exist yet
  • copy db4o-*.jar to this folder
  • Right-click on your project in the Package Explorer and choose "refresh"
  • Right-click on your project in the Package Explorer again and choose "properties"
  • select "Java Build Path" in the treeview on the left
  • select the "Libraries" tabpage.
  • click "Add Jar"
  • the "lib" folder should appear below your project
  • choose db4o-*.jar in this folder
  • hit OK twice

Please, note, that db4o can't be installed in JDK or JRE lib folder, the reasons are explained further in the documentation