Running 0.9 in Eclipse

In order to run an SGS application the following must be true:

  • You must have the 0.9 SGS SDK downloaded on your machine
  • You must be running at least JDK version 1.5.0_11

To create an SGS application project do the following:

(1) Create a Java Project
(2) Include as project libraries all the jars in the SGS sdk lib directory except sgs-client.jar
(3) Include as a project library the db.jar in the sdk lib/db directory
(4) Set the native directory for the db.jar to the appropriate sub directory of lib/db for your OS.
(5) Create an application config .properties file (eg foo.properties). You can look at HelloWorld.properties in the tutorial for an example. Paths can be relative. If so, make sure they are relative to your working directory for the project.
(6) Create a run configuration with the following information:

  • Set your newly created project as the project
  • Set your main to com.sun.sgs.impl.kernel.Kernel
  • Add the following to your VM parameters:
    -Djava.util.logging.config.file=/sgs-logging.properties
    -Dcom.sun.sgs.config.file=/sgs-config.properties
  • Add your application config file as the sole parameters to the application

That should do it. Let me know if you see any problems.

Edit: Pls be aware that in the 0.9 version you need to manually create a directory named “dsdb” in your application root. (The application root is set in the application config properties file) If you don’t the database will exception on start-up. This is a known annoyance that is on our list to rectify.

JK