jtreg and JDK versions

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Jan 24 15:56:13 UTC 2022


TL;DR: jtreg will soon stop supporting very old versions of JDK


As described in [JEP 182], as of JDK 9, javac no longer supports 
compiling for
JDK versions before JDK 8. And separately, to reduce support overhead, 
jtreg has
always focussed on a single line of development with the intent of being 
able to
support multiple versions of JDK development, including very old 
versions. As a
result, since JDK 9, jtreg has been constrained to be compilable with 
JDK 8, so
that we can compile some parts of the code to run on older versions, and 
this
has effectively meant that all of jtreg has been constrained to only use 
API and
language features available in JDK 8. This restriction has also extended 
to the
libraries that we compile and use, such as the CodeTools AsmTools library.

Over time, the technology to manage different versions of jtreg has 
improved,
and given the recent changes to the TestNG library that is bundled with 
jtreg,
the costs of supporting a single version of jtreg are beginning to 
outweigh the
benefits. Therefore, it is proposed that the current line of development 
will be
released as jtreg version 6.2, and that this will be the last version to 
support
running tests on very old versions of JDK. Going forward, future versions of
jtreg will be numbered 7 and up, and will require the use of a more recent
version of JDK to build and run jtreg, such as JDK 11 or JDK 17. Note 
that it
will still be possible to run tests on recent earlier versions on JDK, 
as far
back as is supported by the JDK used to build jtreg. This is currently 
JDK 8.

Overall, this change will allow us to modernize the jtreg code base, and the
libraries on which it depends.

[JEP 182]: https://openjdk.java.net/jeps/182



More information about the jdk-dev mailing list