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 core jar file. In addition you may want to use client/server library or optional components, which you can add separately or use "db4o-all" jar.

db4o-[version]-core-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-[version]-core-java1.2.jar
is built for all Java JDKs between 1.2 and 1.4.

db4o-[version]-core-java5.jar
is built for Java JDK 5 and JDK 6

If you intend to use client/server version of db4o you will additionally need client/server library matching your JDK version:

db4o-[version]-cs-java1.1.jar
db4o-[version]-cs-java1.2.jar
db4o-[version]-cs-java5.jar
 
Some advanced functionality such as cluster support, platform-specific IO adapters, statistic tools etc can be added by including db4o optional library:

db4o-[version]-optional-java1.1.jar
db4o-[version]-optional-java1.2.jar
db4o-[version]-optional-java5.jar

You can also get all of the above in a single jar:

db4o-[version]-all-java1.1.jar
db4o-[version]-all-java1.2.jar
db4o-[version]-all-java5.jar

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. For beginners it is recommended to use "db4o-all" library to avoid confusion with the location of certain classes. 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
  • expand "Referenced Libraries" branch of your project in Package Explorer.
  • select db4o-* library, right-click and open "Properties"
  • select Javadoc Location in the list and browse to \doc\api folder in your db4o installation

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