aspose file tools
The moose likes Java in General and the fly likes Maximum size of a Java Class file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Maximum size of a Java Class file" Watch "Maximum size of a Java Class file" New topic
Author

Maximum size of a Java Class file

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 712
Hi, I was wondering what the maximum size a java class file can be.
I just wrote a class that was about a 100K in size, and Netbeans 5.0 told me the code was too large.
I split the data into 2 classes and there was no problem.

If you were wondering why my class was so big, its because for my chess application, I have decided to create the images from prestored arrays.
It avoids the hassel of loading images in, and the problems faced with loading when using JARs.

Thanks for any info.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32654
    
    4
Don't know. I looked in the JLS and there doesn't seem to be a maximum size there. . .
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Limitations of the Java Virtual Machine are found here:
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
(at the bottom)

Perhaps your class mets one of the criterias - a direct size-of-class limit isn't mentioned there (but perhaps nearby?).


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maximum size of a Java Class file
 
Similar Threads
Regarding big java files...
Make JTable With Images More Responsive?
mediatracker and streams
Part 2 -Upload restrictions and creating the .jar file
Can I set JVM memory size when running applets?