简体   繁体   中英

Code too large on Ant in Linux but compiles on Eclipse in Windows

I have a java file containing an Enum which is very large. the code compiles on Eclipse with JDK 1.8 but fails to do so on Linux when I do an ant build with the same JDK. It is really weird. But, more importantly, is there a fix for compiling codes that are really huge? My friends told me that from Java 1.7, the compilers do not throw that error. Is it true? Can anybody let me know? Thanks in advance!

A single method in a Java class may be at most 64KB of bytecode.

This is probably a sign that you should refactor your code ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM