Android and Log4j

Alan Bateman Alan.Bateman at oracle.com
Sun Dec 3 19:19:34 UTC 2017


On 03/12/2017 18:25, Ralph Goers wrote:
> Log4j added support for Java 9 by:
> Converting the Log4j-API jar to a multi-release jar that includes support for StackWalker and the new Process Id support.
> Adding a module-info.jar to the Log4j API jar.
>
> We are now getting complaints from Android users (as well as a few others) that their tools no longer work with log4j. During development I ran into problems with OSGi. The problems seem to mostly revolve around the fact that they can’t deal with the classes for Java 9. I was surprised that Android is failing on the classes in META-INF/versions/9 as I had assumed that would be an invalid location for a class file prior to Java 9, but that seems not to be the case. The fact that module-info.java turns into a class file also seems to be a problem since the various tools are seeing it and having problems with it.
>
> :
>
> Do you have any recommendations on how we can resolve this impasse?
>
The Android tools should ignore class files in META/**, at least until 
they are updated to work with multi-release JARs. Have you created a bug 
for them to look at this issue?

-Alan


More information about the core-libs-dev mailing list