Create OpenJDK without "code too large".

Remi Forax forax at
Fri Sep 19 15:51:56 UTC 2014

On 09/19/2014 05:26 PM, Andrew Haley wrote:
> Hi,
> On 09/19/2014 04:20 PM, Pascal Kesseli wrote:
>> I am trying to create a Java compiler from OpenJDK 8 which ignores
>> "compiler.err.limit.code" and
>> "compiler.err.limit.code.too.large.for.try.stmt" errors. I understand there
>> is no flag in javac to disable this - is there a way to remove them from the
>> OpenJDK source, such that methods with more instructions will compile?
> Not really.  The code size is a VM limitation.

Technically, it's more a limitation of the classfile format (.class) 
than the VM,
you can not have more than 65535 bytecode instructions by method.

You can try to split method code automatically, Nashorn does that,
but usually it's specific to the code you translate to Java.

> Andrew.


More information about the discuss mailing list