JDK-8304547 : Remove checking of -Djava.compiler in src/jdk.jdi/share/classes/com/sun/tools/jdi/SunCommandLineLauncher.java
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: debugger
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-03-20
  • Updated: 2023-04-03
  • Resolved: 2023-03-27
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 21
21 b16Fixed
Related Reports
Relates :  
Description
SunCommandLineLauncher.java currently throws an exception if it finds that the long outdated 'java.compiler' system property is set anything else than "none".

Since debugging clearly works with JIT compiler these days, it should be safe to remove this check:

if ((options.indexOf("-Djava.compiler=") != -1) &&
    (options.toLowerCase().indexOf("-djava.compiler=none") == -1)) {
    throw new IllegalConnectorArgumentsException("Cannot debug with a JIT compiler",
                                                 ARG_OPTIONS);
}
Comments
Changeset: 46b06023 Author: Eirik Bjorsnos <eirbjo@gmail.com> Committer: Alan Bateman <alanb@openjdk.org> Date: 2023-03-27 14:32:41 +0000 URL: https://git.openjdk.org/jdk/commit/46b0602376893df204bf4d624938bf89abe04d89
27-03-2023

Actually this issue was discovered years ago: JDK-6374661 but never acted upon.
21-03-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13109 Date: 2023-03-20 20:53:41 +0000
20-03-2023