db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: ClassFormatError while performing a SQL insert
Date Thu, 07 Sep 2006 17:39:33 GMT
Bryan Pendleton wrote:

>> java.lang.ClassFormatError: Invalid method Code length 69936 in class 
> 
> 
> There is a hard limit in the JDK class-file format of 64K

Just to be clear, one of the limits in the Java class file format is 64k
bytes of byte code instructions per-method. A large String constant in a
method does *not* contribute to this limit. There is a limit on *number*
of constants in a java class file (65535) but not the size of those
constants. What makes up a entry in what is called the "constant pool"
is more complicated than a 1-1 mapping with literals in the Java
language, e.g. class names and descriptions of methods take up entries,
a String literal will take up two entries, a integer constant can take
up no entries.

For bedtime reading see

http://java.sun.com/docs/books/vmspec/

(section 4.10 in the *first* edition contains the limitations of the
class file format).

Dan.


Mime
View raw message