Compiling and running the application

To use this client, you must first compile it using a standard Makefile, as follows (replace <<datadir>> with the data directory, usually /usr/share):

include <<datadir>>/eyedb/Makefile.eyedb

all: PersonTest.class

person/Database.java: schema.odl
        $(EYEDB_ODL) --gencode=Java --package=person --output-dir=person $<

PersonTest.class: PersonTest.java person/Database.java
        CLASSPATH=$(EYEDB_CLASSPATH):. javac *.java person/*.java

	  

Once compiled, you can execute the program as follows:

	    % CLASSPATH=. eyedbjrun PersonTest person_g
	  

The eyedbjrun script is a helper script that wraps the call to the Java virtual machine with an appropriate CLASSPATH environment variable containing the path to eyedb.jar and passes the necessary options to the PersonTest class.

A few remarks about the Java code:

The Java binding support both the standalone applications and the applets.

To have more information about the Java binding, please refer to the EyeDB Java binding manual.