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 and assume you
downloaded 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 .
    -   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
    -   Choose the directory into which you want to install the Derby software.


    -   ‘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-

  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

  Verify Derby

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

    - java
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-
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-\bin
Java Platform API Specification
java.specification.version: 1.5

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

Shared By: