-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b83
-
generic
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142065 | emb-9 | Martin Buchholz | P3 | Resolved | Fixed | team |
JDK-8183836 | 8u161 | Martin Buchholz | P3 | Resolved | Fixed | b01 |
JDK-8177726 | 8u152 | Martin Buchholz | P3 | Resolved | Fixed | b03 |
JDK-8192570 | emb-8u161 | Martin Buchholz | P3 | Resolved | Fixed | b01 |
This code in java/lang/java_props_md.c:
/* Append CDE message and resource search path to NLSPATH and
* XFILESEARCHPATH, in order to pick localized message for
* FileSelectionDialog window (Bug 4173641).
*/
setPathEnvironment("NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat");
setPathEnvironment("XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt");
unilaterally modifies environment variables that the user expects to
see unmodified. Furthermore, it sets them to values that may be
clearly incorrect (for example, if CDE is not installed, and there
is no /usr/dt).
It is likely there is some mechanism other than the "quick hack"
of the current code to affect the search path for resources that
both respect the user settings and avoid modification of the user's
environment.
Even if those environment variables are set in the current process, they
should not be propagated to child processes. While writing my own
test cases for java.lang.ProcessBuilder, I noticed that these extra
magic environment variables were being created and had to special-case
them.
The Blackdown group was sufficiently annoyed by these that they did:
+#ifndef __linux__
/* Append CDE message and resource search path to NLSPATH and
* XFILESEARCHPATH, in order to pick localized message for
* FileSelectionDialog window (Bug 4173641).
*/
setPathEnvironment("NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat");
setPathEnvironment("XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt");
+#endif
This fix is the path of least resistance. Linux users are unlikely to
be using CDE.
If we do decide to modify the environment, and the selected variables
are undefined, then they should not be unilaterally set to the values above,
but to the concatenation of the default value for
that particular operating system and the value above. This is a subtle
semantic difference.
###@###.### 2003-11-12
/* Append CDE message and resource search path to NLSPATH and
* XFILESEARCHPATH, in order to pick localized message for
* FileSelectionDialog window (Bug 4173641).
*/
setPathEnvironment("NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat");
setPathEnvironment("XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt");
unilaterally modifies environment variables that the user expects to
see unmodified. Furthermore, it sets them to values that may be
clearly incorrect (for example, if CDE is not installed, and there
is no /usr/dt).
It is likely there is some mechanism other than the "quick hack"
of the current code to affect the search path for resources that
both respect the user settings and avoid modification of the user's
environment.
Even if those environment variables are set in the current process, they
should not be propagated to child processes. While writing my own
test cases for java.lang.ProcessBuilder, I noticed that these extra
magic environment variables were being created and had to special-case
them.
The Blackdown group was sufficiently annoyed by these that they did:
+#ifndef __linux__
/* Append CDE message and resource search path to NLSPATH and
* XFILESEARCHPATH, in order to pick localized message for
* FileSelectionDialog window (Bug 4173641).
*/
setPathEnvironment("NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat");
setPathEnvironment("XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt");
+#endif
This fix is the path of least resistance. Linux users are unlikely to
be using CDE.
If we do decide to modify the environment, and the selected variables
are undefined, then they should not be unilaterally set to the values above,
but to the concatenation of the default value for
that particular operating system and the value above. This is a subtle
semantic difference.
###@###.### 2003-11-12
- backported by
-
JDK-8142065 MAWT: Java should be more careful manipulating NLSPATH, XFILESEARCHPATH env variables
-
- Resolved
-
-
JDK-8177726 MAWT: Java should be more careful manipulating NLSPATH, XFILESEARCHPATH env variables
-
- Resolved
-
-
JDK-8183836 MAWT: Java should be more careful manipulating NLSPATH, XFILESEARCHPATH env variables
-
- Resolved
-
-
JDK-8192570 MAWT: Java should be more careful manipulating NLSPATH, XFILESEARCHPATH env variables
-
- Resolved
-
- relates to
-
JDK-8136570 Stop changing user environment variables related to /usr/dt
-
- Resolved
-