JDK-8300700 : Several of the comments in build.gradle are outdated and confusing
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: jfx20
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-01-19
  • Updated: 2024-11-21
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.
Other
tbdUnresolved
Related Reports
Blocks :  
Description
Many of the comments in build.gradle are misleading because they are outdated or inaccurate. This can cause confusion to developers and should be cleaned up.

We can aggregate a list of such typos in this JBS issue.

1. https://github.com/openjdk/jfx/blob/21+0/build.gradle#L617

// Determine the verion of Java in JDK_HOME. It looks like this:
//
// $ java -version
// java version "1.7.0_45"
// Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
// Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
//
// We need to parse the second line
def inStream = new java.io.BufferedReader(new java.io.InputStreamReader(new java.lang.ProcessBuilder(JAVA, "-fullversion").start().getErrorStream()));

In addition to the typo on the first line above (verion instead of version), the command we actually run is "java -fullversion" not "java -version".