javac blames legal class files as "bad class file"

Stephan Herrmann stephan.herrmann at berlin.de
Thu Jun 20 09:42:41 UTC 2024


This is a friendly reminder that https://bugs.openjdk.org/browse/JDK-8024694 is 
still causing grief.

In particular, Eclipse keeps receiving bug reports because javac claims that 
class files created by ecj are "bad".

Latest analysis indicates that this wrong blame could be the result of an 
internal AIOOBE that javac catches and translates into a general, not helpful 
error message.

To be explicit: comments in JDK-8024694 mostly discuss which attributes javac 
should emit, which at this point is irrelevant for Eclipse. The original bug is 
that javac should not expect all class files to follow the same convention in 
situations where JVMS explicitly allows different strategies.

More details can be found around these reports:
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=388314
- https://github.com/eclipse-jdt/eclipse.jdt.core/issues/205

regards,
Stephan


More information about the compiler-dev mailing list