javacodex.com
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

Set your CLASSPATH:

   # 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 org.apache.derby.tools.sysinfo
   ------------------ 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.specification.name: 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] 10.8.2.2 - (1181258)
   [/jdk1.7.0_25/db/lib/derbytools.jar] 10.8.2.2 - (1181258)
   ------------------------------------------------------
   ----------------- Locale Information -----------------
   Current Locale :  [English/United States [en_US]]
   Found support for locale: [cs]
	 version: 10.8.2.2 - (1181258)
   Found support for locale: [de_DE]
	 version: 10.8.2.2 - (1181258)
   Found .......



Contact: javacodex@yahoo.com