Menu

#2 Error: Extra bytes at the end of class file

open
nobody
None
5
2006-03-20
2006-03-20
Anonymous
No

I simply tested ClassEditor by editing a class,
modified nothing at all.Clicked on save. tried to run
the applet, and get the error:
"java.lang.ClassFormatError: Extra bytes at the end of
class file"

i checked the file size before and after saving
(remember, i did not modification whatsoever): the
newly saved file is 2 bytes larger.. why?

Discussion

  • Nobody/Anonymous

    Logged In: NO

    forgot to mention the version number of the program:

    ClassEditor 2.23

     
  • Anthony Wood

    Anthony Wood - 2009-10-27

    The extra bytes are a bug in the Inner Classes attribute number of classes field. I fixed it by editing src/classfile/attributes/InnerClassesAttribute.java on line 60 to be "writeShort" instead of "writeInt".

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.