Apache Derby and Java in Mac OS X

In order to work with Apache Derby in Mac OS X you will first need the .jar files. They can be downloaded from Apache’s site here. The current release comes in several flavors:

  • bin distribution – contains the documentation, javadoc, and jar files for Derby.
  • lib distribution – contains only the jar files for Derby.
  • lib-debug distribution – contains jar files for Derby with source line numbers.
  • src distribution – contains the Derby source tree at the point which the binaries were built.

Download whichever fits your needs – the only essential files are the jar files. Execute the following line in terminal to set a DERBY_HOME variable.

export DERBY_HOME=”Insert the location of your downloaded directory”

You can then enter the next line of code into terminal to set your classpath to include DERBY_HOME (and the two needed jar files) and the root directory.

export CLASSPATH=”$DERBY_HOME/lib/derbytools.jar:.:$DERBY_HOME/lib/derby.jar:$CLASSPATH”

Leave a Reply

Your email address will not be published. Required fields are marked *