Java Examples
Java Examples
memu home questions

Configuring Derby That Comes Bundled With The JDK

Set the JAVA_HOME environment variable:

   # export JAVA_HOME=/jdk1.7.0_25

Next set the PATH environment variable:

   # export PATH=$JAVA_HOME/bin:$PATH
   # java -version
   java version "1.7.0_25"
   Java(TM) SE Runtime Environment (build 1.7.0_25-b15)

Set the DERBY_HOME environment variable:

   # export DERBY_HOME=$JAVA_HOME/db


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

Start Derby:

   # cd $DERBY_HOME/bin
   # . setEmbeddedCP

Run the sysinfo command to show Derby system information:

   # java
   ------------------ Java Information ------------------
   Java Version:    1.7.0_25
   Java Vendor:     Oracle Corporation
   Java home:       /jdk1.7.0_25/jre
   Java classpath:  /jdk1.7.0_25/db/lib/derby.jar:/jdk1.7.0_25/db/lib/derbytools.jar:.
   OS name:         Linux
   OS architecture: i386
   OS version:      3.2.0-45-generic-pae
   Java user name:  root
   Java user home:  /root
   Java user dir:   /jdk1.7.0_25/db/bin Java Platform API Specification
   java.specification.version: 1.7
   java.runtime.version: 1.7.0_25-b15
   --------- Derby Information --------
   JRE - JDBC: Java SE 7 - JDBC 4.0
   [/jdk1.7.0_25/db/lib/derby.jar] - (1181258)
   [/jdk1.7.0_25/db/lib/derbytools.jar] - (1181258)
   ----------------- Locale Information -----------------
   Current Locale :  [English/United States [en_US]]
   Found support for locale: [cs]
	 version: - (1181258)
   Found support for locale: [de_DE]
	 version: - (1181258)
   Found .......