JDK-8333130 : MakeJAR2.sh uses hard-coded JDK version
  • Type: Bug
  • Component: core-svc
  • Sub-Component: java.lang.instrument
  • Affected Version: 23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-05-29
  • Updated: 2024-06-07
  • Resolved: 2024-06-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23 b26Fixed
Related Reports
Relates :  
Relates :  
Description
As noticed in start-of-JDK-24 work, after JDK-8294977 the file

test/jdk/java/lang/instrument/MakeJAR2.sh

which is used to create jar files hard-codes a JDK value of "23" to pair with the --enable-preview javac option. Some kind of environmental query should be used to provide the value to --release instead.

This should be addressed before the JDK 24 start.

Programmatically, the value to be used as an argument for --release is the result of the expression

Runtime.version().feature())

The shell script in question could be rewritten as Java program.
Comments
Changeset: 4369856c Author: Jaikiran Pai <jpai@openjdk.org> Date: 2024-06-05 06:35:46 +0000 URL: https://git.openjdk.org/jdk/commit/4369856c6dbef15b5d73aa1da07216f372a01294
05-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19495 Date: 2024-05-31 09:01:27 +0000
31-05-2024