From 40eacefd8afe50bd10ac074391c7387ad202c233 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 16 Apr 2019 08:39:31 +0200 Subject: [PATCH] this is why we still use env and friends --- manual/Tasks/property.html | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/manual/Tasks/property.html b/manual/Tasks/property.html index 642037010..8378eefbf 100644 --- a/manual/Tasks/property.html +++ b/manual/Tasks/property.html @@ -282,13 +282,20 @@ deploy.port=8080 deploy.url=http://${deploy.server}:${deploy.port}/

Notes about environment variables

-

Ant runs on Java 1.2 therefore it cannot use Java 5 features for accessing environment -variables. So it starts a command in a new process which prints the environment variables, analyzes -the output and creates the properties.
There are commands for the following operating systems -implemented -in Execute.java (method getProcEnvCommand()): +

+ When Ant started to support setting properties from environment + variables it ran on Java 1.2 where System.getEnv didn't + work. So we decided to start a command in a new process which prints + the environment variables, analyzes the output and creates the + properties. Once Java 5 became our baseline we could have switched + to getEnv but it returned different results on some + platforms so we stuck with the command approach to remain backwards + compatible.

+

+ There are commands for the following operating systems implemented in + + Execute.java (method getProcEnvCommand()):
OS