24.5.2 Creating the Chapter’s Databases on Mac OS X

After setting the JAVA_HOME environment variable, perform the following steps:

1. Open a Terminal, then type:

DERBY_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/   Contents/Home/db

and press Enter. Then type

export DERBY_HOME

and press Enter. This specifies where Java DB is located on your Mac.

2. In the Terminal window, change directories to the JDK installation folder’s db/ bin folder. Then, type ./setEmbeddedCP and press Enter to set the environment variables required by Java DB.

3. In the Terminal window, use the cd command to change to the books_examples directory. This directory contains a SQL script books.sql that builds the books database. ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.