Changes between Version 1 and Version 2 of Ticket #20920
- Timestamp:
- 2021-05-23T12:09:25+02:00 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #20920 – Description
v1 v2 10 10 > javac provides two command line options, -source and -target, which can be used to select the version of the Java language accepted by the compiler and the version of the class files it produces, respectively. By default, however, javac compiles against the most-recent version of the platform APIs. The compiled program can therefore accidentally use APIs only available in the current version of the platform. Such programs cannot run on older versions of the platform, regardless of the values passed to the -source and -target options. This is a long-term usability pain point, since users expect that by using these options they'll get class files that can run on the the platform version specified by -target. 11 11 12 [ Ant's <javac>https://ant.apache.org/manual/Tasks/javac.html] supports `release=""`:12 [https://ant.apache.org/manual/Tasks/javac.html Ant's <javac>] supports `release`: 13 13 > Specify the value for the --release switch. 14 _When set and running on JDK 9+ the source and target attributes as well as the bootclasspath will be ignored. Since Ant 1.9.8.14 > When set and running on JDK 9+ the source and target attributes as well as the bootclasspath will be ignored. Since Ant 1.9.8. 15 15 > Required: No, ignored when compiling on JDK 8 or earlier 16 16


