![]() |
Cloudscape Basics and the Sample Database
|
|
Getting to Know Your System DirectoryWhen an application creates a database, Cloudscape puts the database (a directory that holds several files) in what is known as the system directory. The system directory is by default the current directory--whatever directory you happen to be working in. This means that when you run an application that creates a database, that database will be created in the current directory. And when you run an application that interacts with an existing database, it expects the database to be in the current directory. The system directory also holds the information log (cloudscape.LOG), which is generated whenever an application interacts with a Cloudscape database. It is a good idea to specify the system directory instead of letting Cloudscape assume the default directory. That way, your applications will work no matter where you run them. In this section, you will create a system directory so that you can specify the system directory later. Your databases will be built in this directory. You will also create a working directory. This is the directory from which you will run scripts and Java programs. This section includes the following tasks: Create a System Directory for the TutorialCreate a system directory for the tutorial anywhere on your hard disk. Call it tutorial_system. This directory will contain the databases that you create in this tutorial as well as the information log and the properties file. You will refer to the system directory on the command line when you run CreateToursDB later. You will need to specify the full path to the directory. For example, if you created the directory on C:\, you will refer to the system directory as: c:\tutorial_system The remainder of this tutorial refers to the complete path to your system directory as your_tutorial_system. Create a Home or Working Directory for the Tutorial
Make Sure Your PATH Variable Is CorrectThe PATH variable enables your operating system to find the appropriate executables from any directory. You must have the path to the JDK that you wish to use in the PATH variable. See the installation instructions that came with your JDK for information on how to set PATH. Customize Your setclasspath ScriptThe files that you copied over from the scripts directory include three sample script files with the command to set the CLASSPATH environment variable. The file name and command depend on your operating system.
Running the ScriptLater in this tutorial, you will be asked to run this script. Here's how you do that:
Directory ReviewBy the time you get here, you should have created two directories:
Figure 2-2 shows the basic layout of the two directories plus the cloudscape base directory. Figure 2-2 The layout of three directories: your working directory (home to your scripts and Java programs), your system directory (home to your databases, information log, and properties files), and the cloudscape base directory (which is the value of the CLOUDSCAPE_INSTALL environment variable). |
|
![]() Cloudscape Version 3.6 For information about Cloudscape technical support, go to: www.cloudscape.com/support/.Copyright © 1998, 1999, 2000 Informix Software, Inc. All rights reserved. |