TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Method Size Limit in Java

28 pointsby pdeva1almost 14 years ago

3 comments

adrianmsmithalmost 14 years ago
This is a terrible limit. Code generation is necessary for all sorts of things e.g. parsers. Having to hack in code to the code generation just to split methods to get around this limit is ridiculous.<p>I had to literally abandon months of work on one project which was generating simulation code to Java. I was generating millions of lines of code, so splitting up the method would require a main method which would call all those split methods, and then that method would get too long, etc. It all just wasn't feasible, so now I just generate C.<p><a href="http://www.databasesandlife.com/java-method-64k-limit/" rel="nofollow">http://www.databasesandlife.com/java-method-64k-limit/</a>
评论 #2652674 未加载
评论 #2652419 未加载
Uchikomaalmost 14 years ago
We had this problem some years ago with JSP which compiles all code into one service() method.
评论 #2652383 未加载
suprgeekalmost 14 years ago
This is especially irritating considering the numerous other languages that the JVM supports now. Oracle needs to fix this limitation along with bringing in correct Generics support - not the way it is today.