Skip to Content
Java 9: Building Robust Modular Applications
book

Java 9: Building Robust Modular Applications

by Dr. Edward Lavieri, Peter Verhas, Jason Lee
April 2018
Intermediate to advanced content levelIntermediate to advanced
910 pages
33h 21m
English
Packt Publishing
Content preview from Java 9: Building Robust Modular Applications

The --add-opens option

You can use the --add-opens runtime option to allow your code to access non-public members. This can be referred to as deep reflection. Libraries that do this deep reflection are able to access all members, private and public. To grant this type of access to your code, you use the --add-opens option. Here is the syntax:

    --add-opens module/package=target-module(,target-module)*

This allows the given module to open the specified package. The compiler will not produce any errors or warnings when this is used.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java 9 High Performance

Java 9 High Performance

Mayur Ramgir, Nick Samoylov
Distributed Computing in Java 9

Distributed Computing in Java 9

Raja Malleswara Rao Malleswara Rao Pattamsetti

Publisher Resources

ISBN: 9781788832823Supplemental ContentOtherPurchase LinkErrata Page