----- Original Message -----
From: "Pinar Bicioglu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 06, 2001 7:41 PM
Subject: RE: FW: Can't find the files


> Everything is working fine now. But I have a question about setting them
as
> an enviroment variables. How do we do that ? And can we solve this problem

You can do that in the following way:

1) set the environment variable
C:\> set MY_VAR=Test

2) Tell Ant to read in your environment
Place a line like

<property environment="prefix"/>

in your build.xml in a place which is executed before you use these
variables

3) Use them
If you followed the example you should have a property prefix.MY_VAR which
can be used for example with the echo-task

<echo message="${prefix.MY_VAR}"/>

4) Done.

> without involving user work in it. Do they have to make changes with every
> way ?

Someone must get involved. The only way that would come to my mind would be
a custom task that searches all available drives (on windows) and
directories for a file named for example rt.jar and examines that file to
gues if it *could* be a JDK Vwhatever. If time doesn't matter... Keep in
mind that setting an environment variable or editing a configuration file is
a one time action if it's done in the right place (autoexec.bat, ~/.profile,
~/build.properties, %UserProfile%\build.properties, ...)

Nico




Reply via email to