db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Embretsen <John.Embret...@Sun.COM>
Subject Re: Sysinfo too and the environment variables/classpath
Date Tue, 27 Mar 2007 11:09:32 GMT
Laura Stewart wrote:
> In the Getting Started Guide, there is this sentence:
> 
> "The sysinfo script sets the appropriate environment variables,
> including the classpath, and runs the sysinfo tool. "
> 
> 1. Are the environment variable set each time you run sysinfo or just
> the first time?

Each time, I think. The scripts seem to set some helper variables which are in
turn based on environment variables such as DERBY_HOME, JAVA_HOME and CLASSPATH
(if set).

> 2. Is it more accurate to say "The sysinfo tool contains a script that
> sets the appropriate environment variables, including the classpath."
> ???

I don't think so. The sysinfo tool is a Java application, and does not contain
any scripts. The sysinfo script is just a convenient way (more or less, your
mileage may vary ;) ) to invoke the Java application called sysinfo (e.g.
instead of running "java org.apache.derby.tools.sysinfo" (with derby jars in the
classpath) directly.

I still think the sentence could be more accurate. This is because, for example,
the classpath is actually not set as an environment variable, it is just set for
that single execution of the java launcher, using the -classpath option.

Perhaps the following is more accurate?

"The sysinfo script sets the appropriate command line options,
including the classpath, and runs the sysinfo tool."


> 3. What environment variables are set?

I think that depends on the operating system (and whether you run .bat or .sh
scripts), and which env. variables are set already.

For example, from running the sysinfo script on Windows 2003, I see that the
variables DERBY_HOME and LOCALCLASSPATH are set (the latter is a helper variable
that users should not worry too much about, while DERBY_HOME was set to a
working default because I did not set it myself). However, the variables set by
these scripts will be gone once you close the command prompt window.

On Unix platforms, on the other hand, it seems that no variables are set that
outlive the process executing the script (DERBY_HOME must be set by the user).



-- 
John






Mime
View raw message