Home : Error "code too large"
Q88972 - ERRMSG: Error "code too large"

Error "code too large"

 

You may get this error if a generated Java proxy file exceeds the maximum length of byte code that a Java compiler can handle. For example, SUN's JDK 1.4.2_01 has a constraint that the length (in bytes) of a Java code cannot exceed 65535 bytes.

For example, consider TaskProxy.java generated from Microsoft Project 2003 C:\Program Files\Microsoft Office\OFFICE11\MSPRJ.OLB. To increase the memory for your Java compiler, you will need to use the -J-mx128m and -J-ms128m options.

However, compilation causes a "code too large" error at compile time:

The solution is to remove the methods you don't need from the Java class. You can download a slimmed down version of TaskProxy.java here.

Related Articles
No Related Articles Available.

Article Attachments
TaskProxy.zip

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/23/2006.
Last Modified on 2/20/2009.
Last Modified by J-Integra KB Admin.
Article has been viewed 4817 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article