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: Setting the environment variables for Derby
Date Fri, 30 Mar 2007 06:51:43 GMT
Laura Stewart wrote:
>> > If I already have DERBY_HOME set what does %PATH% do?

[snip Andrew's explanation]

> Is this only necessary from the command line? If I am using the
> Control Panel to set DERBY_HOME, it seems odd to put PATH into the
> PATH environment variable...like a circular reference :-)

That is correct. The %PATH% syntax is a convenient way to refer to the current
value of PATH on the command line when you set the new value. This is useful
because when you use

set PATH=...

you reset the entire PATH variable to whatever is on the right-hand side of the
equality. If you do an 'echo %PATH%' after setting 'set PATH=whatever;%PATH%'
you will see that the command shell has expanded %PATH% to whatever value it had
at that time.

When you use the Control Panel (System Properties) way of setting environment
variables, the current value is already there, so you simply edit it (add
whatever you want to add) to get the result you want. I don't think using the
%variable% syntax even works outside of the command shell.

Some documentation on this (for Win XP) is available at
(look for "Using environment variables with Cmd.exe").


View raw message