Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Exceeding 65,535 byte limit(Compile problem)
Exceeding 65,535 byte limit [message #1713531] Wed, 04 November 2015 20:48 Go to next message
George Racin is currently offline George RacinFriend
Messages: 5
Registered: March 2015
Junior Member
When starting a new Servlet project, I get the message "The code for the static initializer is exceeding the 65,535 bytes limit". I have 2 arrays, each over 70K, that I have declared in the code (Tomcat 7 had a problem being able to read from files under Windows 2012). I could have 2 other .java files to house the arrays, but I would still be over the 64K limit. Any ideas how to get around this?
Re: Exceeding 65,535 byte limit [message #1713534 is a reply to message #1713531] Wed, 04 November 2015 21:05 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
This is not an Eclipse question, just a general Java question. Generally, such questions should not be asked here, this is a place for discussions specifically about Eclipse.
The JVM specification dictates certain limits on class sizes (see http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.11); you can't get around it other than to make your code more sanely organized.

[Updated on: Wed, 04 November 2015 21:05]

Report message to a moderator

Re: Exceeding 65,535 byte limit [message #1713535 is a reply to message #1713531] Wed, 04 November 2015 21:01 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 11/04/2015 01:48 PM, George Racin wrote:
> When starting a new Servlet project, I get the message "The code for the
> static initializer is exceeding the 65,535 bytes limit". I have 2
> arrays, each over 70K, that I have declared in the code (Tomcat 7 had a
> problem being able to read from files under Windows 2012). I could have
> 2 other .java files to house the arrays, but I would still be over the
> 64K limit. Any ideas how to get around this?

As this forum is only for Eclipse questions, you might not get any
responses here. I would suggest stackoverflow.com with tags Tomcat,
Servlets and Java.
Re: Exceeding 65,535 byte limit [message #1713536 is a reply to message #1713531] Wed, 04 November 2015 21:10 Go to previous messageGo to next message
George Racin is currently offline George RacinFriend
Messages: 5
Registered: March 2015
Junior Member
But wait, the 'exceeds 65,535' msg is coming from Eclipse, right? I don't understand why this isn't an Eclipse issue: isn't Eclipse limiting the .java file size?
Re: Exceeding 65,535 byte limit [message #1713538 is a reply to message #1713536] Wed, 04 November 2015 21:13 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Eclipse's compiler is just enforcing the Java language and JVM spec rules. Don't shoot the messenger, the message comes from Gosling and friends at Oracle. Wink
Re: Exceeding 65,535 byte limit [message #1713546 is a reply to message #1713531] Thu, 05 November 2015 00:54 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

This is already a workaround for another problem. I'd suggest attacking that original problem; I doubt this is the only time you'll face it.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Download Android SDK and Android Emulator ?
Next Topic:How to convert GEF Plugin to Java Web start
Goto Forum:
  


Current Time: Fri Apr 26 03:12:21 GMT 2024

Powered by FUDForum. Page generated in 0.08491 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top