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

Martin Buchholz martinrb at
Wed May 17 16:36:27 UTC 2017

Stop trying to add APIs to mutate environment variables.  It's not going to
happen!  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.

More information about the core-libs-dev mailing list