Add-Opens Java Jar Manifest attribute

Viewed 262

What's the correct way to add Add-Opens attribute in java jar Manifest? I have added the attribute and it appears like this in MANIFEST.MF file:

Add-Opens: java.base/sun.security.ssl

The doc: https://openjdk.java.net/jeps/261#Packaging:-Modular-JAR-files mentions

A <module>/<package> pair in the value of an Add-Opens attribute has the same meaning as the command-line option --add-opens <module>/<package>=ALL-UNNAMED".

Providing argument via command line works as expected, however, adding it as an attribute in manifest doesn't.

Is this the correct way to add Add-Opens attribute?

0 Answers
Related