title: What is the maximum size of a Java .class file?
body: <p>A <code>.class</code> file is a rather <a href="https://en.wikipedia.org/wiki/Java_class_file" rel="noreferrer">well documented format</a> that defines sections and size, and therefore maximum sizes as well.</p>
  
  <p>For instance, a <code>.class</code> 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.</p>
  
  <p><strong>What are the other limits? And, if you would make the largest <code>.class</code> file possible, what size would it be?</strong></p>
  
  <p>If needed, limit answers to Java. Meaning that if Scala or Clojure (or...) change some limits, disregard those values.</p>