You can download SQLG2 binaries and sources at http://sourceforge.net/projects/sqlg2.
To build SQLG2 from sources you need:
Run ANT on the root build.xml
file to build SQLG2 libraries.
Examples are located at doc/examples
directory (db.properties
file is placed there too). To run examples, you need:
First, you need to configure build environment for your database. You may change following configuration parameters:
DB property | Where to change | Default value |
---|---|---|
JDBC driver class name | db.properties file - jdbc.driver property | Defaults to oracle.jdbc.driver.OracleDriver |
JDBC driver library path | db.properties file - jdbc.lib property; should point to jar or zip file. It should be written correctly in the syntax of property files - on Windows systems slashes have to be written forward or as double backslashes. | You have to change it |
SQLG setup for specific database | db.properties file - sqlg.dbclass property | Defaults to Oracle database (sqlg2.db.OracleDBSpecific class) |
JDBC URL | db.properties file - jdbc.url property (it is read in build.xml and passed as a program argument when running example) | You have to change it |
User login | db.properties file - db.username and db.password properties | Defaults to user sqlg2 with password sqlg2 . You can either create such user or change it in db.properties file. |
After you have set up database properties, you can run examples. Go to example directory (doc/examples/example1
for instance). The example may have some specific requirements on schema or additional libraries, so read README file for that example and create all necessary schema objects or install required libraries. Then run example as written in README.