Java Reference
In-Depth Information
•M c OS :
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
• Ubuntu Linux:
/usr/lib/jvm/java-7-oracle
For Linux, the install location depends on the installer you use and possibly the version of
Linux that you use. We used Ubuntu Linux for testing purposes.
Depending on your platform, the JDK installation folder's name might differ if you're
using a different update of JDK 7 or using JDK 8. In the following instructions, you
should update the JDK installation folder's name based on the JDK version you're using.
Java DB Configuration
Java DB comes with several files that enable you to configure and run it. Before executing
these files from a command window, you must set the environment variable JAVA_HOME to
refer to the JDK's exact installation directory listed above (or the location where you in-
stalled the JDK if it differs from those listed above). See the Before You Begin section of
this topic for information on setting environment variables.
24.5.1 Creating the Chapter's Databases on Windows
After setting the JAVA_HOME environment variable, perform the following steps:
1. Run Notepad as an administrator. To do this on Windows 7, select Start > All
Programs > Accessories , right click Notepad and select Run as administrator . On
Windows 8, search for Notepad, right click it in the search results and select
Advanced in the app bar, then select Run as administrator .
2. From Notepad, open the batch file setEmbeddedCP.bat that is located in the
JDK installation folder's db\bin folder.
3. Locate the line
@rem set DERBY_INSTALL=
and change it to
@set DERBY_INSTALL=%JAVA_HOME%\db
Save your changes and close this file.
4. Open a Command Prompt window and change directories to the JDK installa-
tion folder's db\bin folder. Then, type setEmbeddedCP.bat and press Enter to set
the environment variables required by Java DB.
5. Use the cd command to change to this chapter's books_examples directory. This
directory contains a SQL script books.sql that builds the books database.
6. Execute the following command (with the quotation marks):
"%JAVA_HOME%\db\bin\ij"
to start the command-line tool for interacting with Java DB. The double quotes
are necessary because the path that the environment variable %JAVA_HOME% repre-
sents contains a space. This will display the ij> prompt.
 
 
Search WWH ::




Custom Search