TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Method Size Limit in Java

28 点作者 pdeva1将近 14 年前

3 条评论

adrianmsmith将近 14 年前
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 未加载
Uchikoma将近 14 年前
We had this problem some years ago with JSP which compiles all code into one service() method.
评论 #2652383 未加载
suprgeek将近 14 年前
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.