Java 9 options –add-exports vs. -XaddExports not recognized

We Are Going To Discuss About Java 9 options –add-exports vs. -XaddExports not recognized. So lets Start this Java Article.

Java 9 options –add-exports vs. -XaddExports not recognized

  1. Java 9 options –add-exports vs. -XaddExports not recognized

    The two flags have slightly different syntax. At some point (I think it was build 9-ea+113) where the JVM switched over from -XaddExports to the --add-exports syntax, as part of the effort for JEP 293 which aims to achieve GNU-style syntax for command line arguments.

  2. Java 9 options –add-exports vs. -XaddExports not recognized

    The two flags have slightly different syntax. At some point (I think it was build 9-ea+113) where the JVM switched over from -XaddExports to the --add-exports syntax, as part of the effort for JEP 293 which aims to achieve GNU-style syntax for command line arguments.

Solution 1

The two flags have slightly different syntax. At some point (I think it was build 9-ea+113) where the JVM switched over from -XaddExports to the --add-exports syntax, as part of the effort for JEP 293 which aims to achieve GNU-style syntax for command line arguments.

Current syntax:

--add-exports <module>/<module>/<package>=<target-module>(,<target-module>)*
--add-reads <module>=<target-module>(,<target-module>)*

Note: Some utilities may have trouble accepting the new --key value style of arguments because there is a space between them, in that case you can put also put an equals sign in the middle (i.e. --key=value) to satisfy those utilities.

Old syntax:

-XaddExports:<module>/<module>/<package>=<target-module>(,<target-module>)*
-XaddReads:<module>=<target-module>(,<target-module>)*

Unfortunately, it’s very easy to miss the space to colon change. I’ve messed it up several times myself.

Original Author Andy Guibert Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment