A .class
file is a rather well documented format that defines sections and size, and therefore maximum sizes as well.
For instance, a .class
file contains a magic number (4 bytes), a version (4 bytes), the constant pool (variable size), etc. But sizes can be defined on several levels: you can have 65535 methods and each is limited to 65535 bytes.
What are the other limits? And, if you would make the largest .class
file possible, what size would it be?
If needed, limit answers to Java. Meaning that if Scala or Clojure (or...) change some limits, disregard those values.
See Question&Answers more detail:os