Review request: jar tool to transform a plain jar file to a modular jar

Alan Bateman Alan.Bateman at oracle.com
Tue Sep 13 10:32:42 PDT 2011


Mandy Chung wrote:
>
> Yes, the JAR spec needs to be updated but the JAR spec is in the pubs 
> repo.  I prefer to defer to update the docs later before we integrate 
> to JDK 8 and track it in the bug database for the time being.
You're right, we just need to remember to go back to it later.

>
>> Minor comment is that the new methods should have @since 1.8.
>
> Fixed.
MODULEINFO_NAME will need this too.


>>
>> A passing comment on SimpleLibrary lines 980-988 is that they could 
>> be replaced with Files.write(is, md.toPath().resolve("info"));
>>
>
> Thanks for the suggestion.  I think you meant Files.copy.
Sorry yes, I meant Files.copy.

>
>> The sun.tools.jar.ModuleInfo class looks very useful and I'm sure we 
>> will have other places that need to generate module-info classes. 
>> Would it make sense to put it in org.openjdk.jigsaw? If so then it 
>> would be good to have it support requires optional too.
>
> org.openjdk.jigsaw.** is included in the base module while 
> sun.tools.jar.ModuleInfo is for tools to use and it depends on 
> com.sun.tools.classfile library.  Sorry I initially also thought that 
> org.openjdk.jigsaw might be an appropriate package to put this class 
> but it's not.
Okay for now but I think we're going to need this in other places soon 
to avoid duplicating the code.

-Alan.



More information about the jigsaw-dev mailing list