Getting a live view of environment variables (Gradle and JDK 9)

Kirk Pepperdine kirk.pepperdine at gmail.com
Thu May 18 07:46:45 UTC 2017


> On May 18, 2017, at 6:15 AM, David Holmes <david.holmes at oracle.com> wrote:
> 
> On 18/05/2017 2:36 AM, Martin Buchholz wrote:
>> Stop trying to add APIs to mutate environment variables.  It's not going
>> to happen!
> 
> Not sure who or what you are directing this at Martin. Certainly I'm not suggesting any API to mutate environment variables. This is about an API to re-read an already potentially mutated external environment.
> 
>> There is no known way to mutate environment variables in a
>> multithreaded Unix process without risk of native crashes (and I have
>> worn the hat of poor support engineer trying to diagnose SEGV in
>> getenv).  IIRC we made the decision 13 years ago to cache the
>> environment on first access, and that was before the thread-unsafety of
>> putenv was fully appreciated.
>> 
>> Yes, Java still has a serious startup performance problem; that should
>> be attacked more directly.
> 
> ?? Not sure what startup has to do with the topic here.

The reason to use a daemon is to avoid multiple starts of a JVM in-between steps in a build. It is a great idea but the proposed implementation is at issue because it requires a highly questionable API be added to the JDK.

Kind regards,
Kirk



More information about the core-libs-dev mailing list