Java 9 (jdk-9+170) does not allow by default an application to see all classes from the JDK, unlike all previous versions of Java, due to the new module system.
To workaround this, the
java -jar josm.jar --add-exports java.base/sun.security.util=ALL-UNNAMED --add-exports java.base/sun.security.x509=ALL-UNNAMED
--add-exportsthe package is exported, meaning all public types and members therein are accessible at compile and run time.
--add-opensthe package is opened, meaning all types and members (not only public ones!) therein are accessible at run time.
So the main difference at run time is that
--add-opens allows "deep reflection", meaning access of non-public members. You can typically identify this kind of access by the reflecting code making calls to