Creating modules with JDK8

Cédric Champeau cedric.champeau at gmail.com
Mon Nov 30 10:34:10 UTC 2015


Actually no, you made me realize that the module-info.class file uses the
same class format as in Java 8, so it should be ok with existing tools I
guess, as long as they don't rewrite classes. So it's unlikely to happen
for classpath scanning, but at compile time more likely (think of ProGuard).

2015-11-30 10:43 GMT+01:00 Alan Bateman <Alan.Bateman at oracle.com>:

>
> On 30/11/2015 08:50, Cédric Champeau wrote:
>
>> :
>>
>> Eventually, I would also not recommend to put a module-info class (jdk 9
>> format) into a jar built for java 8. Just because there are tons of
>> changes
>> that it will blow up
>> at runtime for legacy applications that use classpath scanning, and will
>> fail when they see an unrecognized class format.
>>
>>
>> Out of curiosity,  you have examples of this? The hyphen makes it an
> invalid identifier so I would expect it should be ignored. At this time
> then the class file version is still 52.0 but maybe you've seen examples
> where something scanning the class path barfs on the new access_flags?
>
> -Alan
>


More information about the jigsaw-dev mailing list