RFR: 8349254: Disable "best-fit" mapping on Windows environment variables
Naoto Sato
naoto at openjdk.org
Fri Feb 7 18:45:10 UTC 2025
On Fri, 7 Feb 2025 14:42:44 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> In (the Windows specific) `src/java.base/windows/native/libjli/cmdtoargs.c` there's an additional call to lookup (a different) `_JAVA_OPTIONS` environment variable through `getenv()` just to log out that environment variable's value. Should we replace that call to `getenv()` with `winGetEnv()` too?
It is a debug code and simply log out the environment variables (as you pointed out), I think it is OK to leave it as it is.
> And on a more general note, should the calls to `getenv()` in the launcher's native code (for example, For example, the `getenv("CLASSPATH")`) be re-examined in context of this issue and have it replaced with this alternative?
I skimmed through all the `getenv()`s in the launcher, and I don't see other occurrences require this special handling. They all simply fails (as expected). I believe ones that are used for command line arguments are relevant in this case.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23498#issuecomment-2643714733
More information about the core-libs-dev
mailing list