Docstoc

Guide to Installing and Configuring Apache Derby.docx - Google Code

Document Sample
Guide to Installing and Configuring Apache Derby.docx - Google Code Powered By Docstoc
					        This guide is an overview of the steps to take in order to install and configure Apache Derby
on a Windows machine. These tutorial instructions use version 10.5.3.0 and assume you
downloaded db-derby-10.5.3.0-bin.zip. If you are unable to understand my guide simply click the
hyperlinks to go the more detailed websites 

  Installing Derby

    -   To install Derby you’ll need to download the distribution and extract the package from
        http://db.apache.org/derby/derby_downloads.html .
    -   Derby requires Java 2 Standard Edition (J2SE) 1.4.2 or higher. Only the Java Runtime
        Environment (JRE) is required to run Derby, but there’s no harm in having the entire Java
        Development Kit (JDK). Help on how to install JDK is available at http://java.sun.com/j2se/
    -   Choose the directory into which you want to install the Derby software.

  Set DERBY_INSTALL

    -   ‘Set’ the DERBY_INSTALL variable to the location where you installed Derby using the cmd
        prompt screen. Use the following command but of course, match the install location to the
        one you chose : set DERBY_INSTALL=C:\Apache\db-derby-10.5.3.0-bin

  Configure Embedded Derby

    -   To use Derby in its embedded mode set your CLASSPATH to include the jar files listed below:
            o derby.jar: contains the Derby engine and the Derby Embedded JDBC driver
            o derbytools.jar ( optional)
    -   Set your CLASSPATH explicitly with the command shown below:
            o Set
                CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;

  Verify Derby

Run the sysinfo command, (below) to output Derby system information:

    - java org.apache.derby.tools.sysinfo
Successful output will look something like figure 1:

The output on your system will probably be somewhat different from the output shown above, but
it should reflect the correct location of jar files on your machine and there shouldn't be any errors. If
you see an error like

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/derby/tools/sysinfo, it
means your class path is not correctly set.

Lastly, echo your CLASSPATH, using the command below, then double check each entry in your class
path to verify that the jar file is where you expect it:

    -   echo %CLASSPATH%
    -   C:\Apache\DB-DER~1.1-B\lib\derby.jar;C:\Apache\DB-DER~1.1-B\lib\derbytools.jar;
------------------ Java Information ------------------
Java Version: 1.5.0_06
Java Vendor: Sun Microsystems Inc.
Java home: C:\jdk1.5 Java classpath: C:\Apache\DB-DER~1.1-B\lib\derby.jar;C:\Apache\DB-DER~1.1-
B\lib\derbytools.jar;
OS name: Windows XP OS
architecture: x86
OS version: 5.1
Java user name: user
Java user home: C:\Documents and Settings\user
 Java user dir: C:\Apache\db-derby-10.5.3.0-bin\bin
 java.specification.name:
Java Platform API Specification
java.specification.version: 1.5

-------- Derby Information --------
JRE - JDBC: J2SE 5.0 - JDBC 3.0
[C:\Apache\db-derby-10.5.3.0-bin\lib\derby.jar] 10.5.3.0 - (802917)
 [C:\Apache\db-derby-10.5.3.0-bin\lib\derbytools.jar] 10.5.3.0 - (802917)
---------------------------------------------- ----------------- Locale Information -----------------
Current Locale : [English/Australia [en_AUS]]
 Found support for locale: [cs]
 .
 . Found support for locale: [zh_TW] version: 10.5.3.0 - (802917) ------------------------------------------------------

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:7
posted:11/27/2011
language:English
pages:2