On 06/04/2016 11:17, Richard Opalka wrote:
Hi Experts,

I expected if users provide 'multirelease' jar file with modules-info.class
placed in its META-INF/versions/9 folder would work without problems.
But I'm getting:

Caused by: java.lang.IllegalArgumentException: META-INF.versions.9: Invalid package name: Illegal character at index 4

instead. Does it mean JEP238 and JEP-261 cannot coexist?
There isn't any support yet for modular JAR as multi-release JARs. It's tracked as JDK-8146486 with the main question being whether the compiled module declaration can be in the META-INF/versions tree or not.

As things stand then a JAR file that does not have a module-info.class in the top level directory is assumed to be an automatic module so this is why it barps when trying to determine a package name from META-INF/versions/9.

BTW: Just looking at the contents of your JAR file then it looks like this is the EE version of the Common Annotations. In that case you shouldn't need a multi-release JAR. Instead you should be able to put the module-info.class in the top level directory and deploy it on the upgrade module path.

-Alan

Reply via email to