JDK-8163316 : Update FX to use new gnu style java command line options
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-08-05
  • Updated: 2016-08-29
  • Resolved: 2016-08-29
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 9
9Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Description
We need to adapt to the new gnu style java command for many of the arguments we use - like -Xpatch -> --patch-module

This is known to affect
    * buildSrc/src/main/java/workaround/GradleJUnitWorker.java 
    * build.gradle (generation of xpatch.args if not other places)
    * tools/scripts/make_xpatch.args
    * others ?
Also... change the paths so they are quoted to protect against paths with spaces in them.
Consider fixing the java.library.path to point to other than build/sdk

Once we change this, we will need to version check JIGSAW_BUILD

for the latest options, see: http://openjdk.java.net/jeps/293

-Xpatch ->
--patch-module <module>=<file>(:<file>)*

-addExport, -addReads ->
--add-reads <module>=<target-module>(,<target-module>)*
--add-exports  <module>=<target-module>(,<target-module>)*

-mp, -modulepath ->
--module-path <path>,   -p <path>
Override or augment a module with classes and resources in JAR files or directories.


Comments
Changeset: 71b85c951d62 Author: ddhill Date: 2016-08-29 09:28 -0400 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/71b85c951d62 8163316: Update FX to use new gnu style java command line options Reviewed-by: kcr ! apps/tests/Robot/nbproject/project.properties ! build.gradle ! buildSrc/src/main/java/workaround/GradleJUnitWorker.java ! modules/javafx.base/src/test/addExports ! modules/javafx.controls/src/test/addExports ! modules/javafx.fxml/src/test/addExports ! modules/javafx.graphics/src/test/addExports ! modules/javafx.web/src/test/addExports ! tests/system/src/test/addExports ! tests/system/src/test/java/test/util/Util.java ! tools/scripts/make_xpatch.sh
29-08-2016

Version .4 looks great. +1
25-08-2016

Looks good except for two issues: 1. The following application launching tests in systemTests are failing: test.launchertest.MainLauncherTest test.shutdowntest.ShutdownHookTest test.sandbox.SandboxAppTest The following error is printed when the test tries to launch the app: Unrecognized option: --add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED It looks like "--add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED" is being treated as a single argument containing a space, rather than as two arguments which is what is needed. The bug is here: tests/system/src/test/java/test/util/Util.java ---------------------------------------------- + cmd.add("--add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED"); That should be done as two separate calls to cmd.add(). 2. Also, I found one more place you missed: apps/tests/Robot/nbproject/project.properties --------------------------------------------- run.jvmargs=-XaddExports:javafx.graphics/com.sun.glass.ui=ALL-UNNAMED
22-08-2016

updated webrev http://cr.openjdk.java.net/~ddhill/8163316.3
17-08-2016

I tested version .2 (after fixing a merge conflict, which you will discover when you rebase your patch to the current tip), and it runs fine for me. I haven't reviewed the changes yet...I'll do that later this week.
15-08-2016

+1
12-08-2016

updated webrev http://cr.openjdk.java.net/~ddhill/8163316.2
12-08-2016

correcting this to make v2 ddhill@ddhill-pad:~/sb/9/newargs/rt$ hg diff diff -r d26bb134cc78 build.gradle --- a/build.gradle Thu Aug 11 11:33:33 2016 -0400 +++ b/build.gradle Fri Aug 12 13:06:34 2016 -0400 @@ -2942,10 +2942,10 @@ tasks.withType(JavaCompile) { compile -> compile.options.forkOptions.executable = JIGSAW_JAVAC compile.options.compilerArgs = [ - "--add-exports java.base/sun.security.pkcs=ALL-UNNAMED", - "--add-exports java.base/sun.security.timestamp=ALL-UNNAMED", - "--add-exports java.base/sun.security.x509=ALL-UNNAMED", - "--add-exports java.base/com.sun.tools.jdeps=ALL-UNNAMED", + "--add-exports", "java.base/sun.security.pkcs=ALL-UNNAMED", + "--add-exports", "java.base/sun.security.timestamp=ALL-UNNAMED", + "--add-exports", "java.base/sun.security.x509=ALL-UNNAMED", + "--add-exports", "java.base/com.sun.tools.jdeps=ALL-UNNAMED", "-encoding", "UTF-8"] } }
12-08-2016

We need to wait for the implementing patch to be promoted, but an early local build shows this webrev passes 'gradle clean test' on linux. It probably needs a FULL_TEST workout before committing. http://cr.openjdk.java.net/~ddhill/8163316/ Of NOTE: build/xpatch.args ---> build/patchmodule.args we will want to update documentation and such about JFX_XPATCH --> JFX_PATCH and what it points to
11-08-2016

We are blocked by the submission of this implementing bug (JDK-8136930) and then by promotion of the fix.
09-08-2016