2.2. Installation
Prev | Chapter 2. Kodo Installation | Next

## 2.2. Installation

### 2.2.1. Updates

Please check the web site to download the latest version of Kodo.

### 2.2.2. Key Files in the Download

1. `README.txt` - The README file.

2. `lib/hypersonic-license.txt` - License agreement to use Hypersonic database.

3. `lib/jakarta-commons-license.txt` - License agreement to use Jakarta Commons libraries.

4. `lib/serp-license.txt` - License agreement to use Serp libraries.

5. `lib/sun-treetable-license.txt` - License agreement to use Sun's treetable.

6. `lib/xanlan-license.txt` - License agreement to use Apache Xanlan Project software.

7. `lib/xerces-license.txt` - License agreement to use Apache Xerces Project software.

### 2.2.3. Quick Start

Follow the instructions in the appropriate installation section below. Note that if you are reading this in the `README.txt` file, the online documentation can be found at: http://download.oracle.com/docs/cd/E13189_01/kodo/docs40/index.html

If you received this package on a CD, you will need to download a valid license key from: http://ftpmain.bea.com/download/pub/license/kodo/kodo40/license.bea While obtaining your license key, we highly recommend that you download the latest version of Kodo.

### 2.2.4. Upgrading from Previous Kodo Versions

There may be significant differences to properties, mappings, and internal APIs between major releases of Kodo. For information about how to upgrade from a previous Kodo versions, see Appendix D of the Kodo Reference Guide.

### 2.2.5. Requirements

- A valid Kodo license key. Evaluation keys are available at: http://ftpmain.bea.com/download/pub/license/kodo/kodo40/license.bea

- JDK 1.5 or higher for JPA; JDK 1.2 or greater for JDO.

- A relational database with JDBC driver, such as Oracle, IBM DB2, Microsoft SQLServer, Sybase, Pointbase, MySQL, PostgreSQL, or Hypersonic SQL. This installation is bundled with Hypersonic, which requires no installation and minimal configuration.

### 2.2.6. Terminology

`KODOHOME`

  This is the directory where you installed Kodo.

`JDKHOME`

  This is the directory where you installed the JDK.

### 2.2.7. Windows Installation

1. Read and agree to any third party license agreements.

2. Edit `KODOHOME/bin/kodocmd.bat` and `KODOHOME/bin/kodocommand.bat` so that `KODODIR` and `JDKHOME` are set correctly.

3. Run `KODOHOME/bin/kodocmd.bat` or `KODOHOME/bin/kodocommand.bat`. (The former relies on 'cmd', the command shell for Windows XP, 2000, and NT; the latter uses 'command', the command shell for Windows ME, 98, and 95.) All tutorial commands should be executed from this shell.

4. Open http://download.oracle.com/docs/cd/E13189_01/kodo/docs40/index.html For JPA, navigate to the Kodo JPA Tutorials. For JDO, navigate to the Kodo JDO Tutorials. These tutorials are in Part IV of the Kodo documentation.

5. Change to the `KODOHOME/tutorial/persistence` directory or the `KODOHOME/tutorial/jdo` directory.

6. Start the tutorial.

### 2.2.8. POSIX (Linux, Solaris, Mac OS X, Windows with cygwin, etc.) Installation

1. Open a shell.

2. Ensure that your `CLASSPATH` environment variable contains the base Java runtime package (`$JDKHOME/jre/lib/rt.jar` for JDK 1.2 or higher).

3. Change to the `KODOHOME` directory.

4. Type '`chmod a+x bin/*`'. This will give you execute permissions on all packaged shell scripts.

5. Type '`source bin/envsetup`' (On Windows with Cygwin, type '`source bin/cygsetup`'). This will modify your `CLASSPATH` and `PATH` environment variables to add in the libraries in `KODOHOME/lib` and the executables in `KODOHOME/bin`.

6. Open http://download.oracle.com/docs/cd/E13189_01/kodo/docs40/index.html For JPA, navigate to the Kodo JPA Tutorials. For JDO, navigate to the Kodo JDO Tutorials. These tutorials are in Part IV of the Kodo documentation.

7. Change to the `KODOHOME/tutorial/persistence` directory or the `KODOHOME/tutorial/jdo` directory.

8. Start the tutorial.

### 2.2.9. Common Installation Problems

Problem: Shell error when running '`javac *.java`' or when using '`java`'

Solution: Ensure that `java` and `javac` are installed and in your path. To verify that they are installed, type '`java`' on a line by itself. If this returns a usage statement, then `java` is installed and in your path. Repeat with '`javac`' instead of '`java`' to see if `javac` is installed correctly. If these tests fail, install JDK 1.2 or greater. Also, please make sure that `kodocmd.bat` sets up your path properly.

Problem: When running '`kodoc`', you get a `NoClassDefFoundError` with a message like the following: `java.lang.NoClassDefFoundError: Animal (wrong name: tutorial/persistence/Animal)`

Solution: This often means that you are invoking `kodoc` from the directory that contains the class `Animal`, and '.' is in your classpath. Fixing your classpath or running `kodoc` from a different directory should solve this problem.

Problem: A '`sealing violation`' occurs when running the enhancer.

Solution: This indicates that some other library in your `CLASSPATH` is conflicting with the jars packaged with this distribution.

### 2.2.10. Resources

If you have any technical questions while evaluating or installing Kodo, please send an email to `<support@solarmetric.com>`.

The web site (http://www.solarmetric.com) has Kodo development resources, including frequently asked questions, our bug tracking system, Kodo newsgroups, access to technical support, and links to a variety of technical articles and third party tutorials.

Prev | Up | Next
Chapter 2. Kodo Installation | Home | Part 2. Java Persistence API