package-info.java compiled name

Andrey Turbanov turbanoff at gmail.com
Mon Aug 1 07:29:07 UTC 2022


Hello.
We found confusing behaviour of javac, when it compiles package-info.java
On Windows name of compiled _inteface_ contains backslashes:

client>javap package-info.class
Compiled from "package-info.java"
interface some\org\client\package-info {
}

On Linux it looks ok:

client$ javap  package-info.class
Compiled from "package-info.java"
interface some.org.client.package-info {
}

It turns out, such behaviour breaks AspectJ code -
https://github.com/eclipse/org.aspectj/issues/176 (sample maven
project - https://github.com/eclipse/org.aspectj/files/9188154/dxcore-temp.zip)
I believe content of class file shouldn't not depend on compilation platform.
Is there a reason why javac behaves like this?


Best regards,
Andrey Turbanov


More information about the compiler-dev mailing list