These two attributes are defined to ease migration so that executable JARs can 
run with java -jar command, as is today, to avoid adding command-line options 
to break into encapsulation.

Mandy
[1] http://openjdk.java.net/projects/jigsaw/spec/issues/#AddExportsInManifest

> On May 11, 2017, at 1:25 PM, Paul Bakker <paul.bakker...@gmail.com> wrote:
> 
> I'm a little confused by "...deployments work if they are dependent on JDK 
> internal APIs". What does internal JDK usage have to do with 
> opening/exporting your own packages? I would think this solves the problem 
> that some other code (e.g. a library) requires access to application code?
> Also, can you elaborate why this only applies to the unnamed module and can't 
> do the same a the --add-exports/--add-opens flags?
> 
> Note that I don't actually need these features, but I want to make sure I 
> document correctly.
> 
> Paul
> 
> 
>> On May 11, 2017, at 12:10 AM, Alan Bateman <alan.bate...@oracle.com> wrote:
>> 
>> On 11/05/2017 07:51, Paul Bakker wrote:
>> 
>>> Hi Alan,
>>> 
>>> What is the reason only exports/opens to unnamed are possible?
>>> Also, are these implemented in the current jigsaw prototype? I'm having 
>>> trouble getting it to work, but that might be entirely my own doing...
>>> 
>> The attributes are defined for the main application JAR when run with `java 
>> -jar app.jar`. So there are defined to keep existing deployments work if 
>> they are dependent on JDK internal APIs.
>> 
>> The attributes have been in JDK 9 for a long time and I'm not aware of any 
>> issues. If it looks like it's not your "own doing" then send an example and 
>> we'll figure it out.
>> 
>> -Alan
> 

Reply via email to