Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2177817 | 5.0-pool | Dmeetry Degrave | P4 | Closed | Won't Fix |
The 1.5.0 javadoc for java.lang.System states:
The current set of system properties for use by the getProperty(String)
method is returned as a Properties object. If there is no current set
of system properties, a set of system properties is first created and
initialized. This set of system properties always includes values for
the following keys: ...
And among the keys listed is java.compiler. The above statement thus
quite clearly claims that a value for java.compiler always should
be included.
However, when executing a small program that lists the system
properties (see attachment), java.compiler is lacking when using
1.5.0. Further, the 1.5.0 javadoc for java.lang.Compiler states:
When the Java Virtual Machine first starts, it determines if the system
property java.compiler exists. (System properties are accessible through
getProperty and , a method defined by the System class.) If so, it is
assumed to be the name of a library ...
I interpret this as "sometimes the system property java.compiler could
be missing".
So, in addition to aforementioned discrepancy between implementation and
documentation, there also appears to be a discrepancy (contradiction)
within the documentation itself.
The current set of system properties for use by the getProperty(String)
method is returned as a Properties object. If there is no current set
of system properties, a set of system properties is first created and
initialized. This set of system properties always includes values for
the following keys: ...
And among the keys listed is java.compiler. The above statement thus
quite clearly claims that a value for java.compiler always should
be included.
However, when executing a small program that lists the system
properties (see attachment), java.compiler is lacking when using
1.5.0. Further, the 1.5.0 javadoc for java.lang.Compiler states:
When the Java Virtual Machine first starts, it determines if the system
property java.compiler exists. (System properties are accessible through
getProperty and , a method defined by the System class.) If so, it is
assumed to be the name of a library ...
I interpret this as "sometimes the system property java.compiler could
be missing".
So, in addition to aforementioned discrepancy between implementation and
documentation, there also appears to be a discrepancy (contradiction)
within the documentation itself.
- backported by
-
JDK-2177817 (spec) java.compiler related inconsistency between implementation and docs
-
- Closed
-
- duplicates
-
JDK-6356262 java.compiler key does not show up by using getProperties() in 5.0
-
- Closed
-
- relates to
-
JDK-6334530 (spec) Some System.getProperties keys undocumented
-
- Closed
-
-
JDK-6374661 JDI: Obsolete reference to java.compiler should be removed
-
- Closed
-
-
JDK-8017116 Deprecate java.lang.Compiler
-
- Closed
-
-
JDK-8041676 remove the java.compiler system property
-
- Closed
-
(1 relates to)