wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Max size of java class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Max size of java class" Watch "Max size of java class" New topic
Author

Max size of java class

Paul Doherty
Greenhorn

Joined: Jan 11, 2001
Posts: 11
What is the maximum size(in kilobytes) a java class can be? Indeed can a class be any size?
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
In theory there is no limit, however a particular machine may throw an OutOfMemoryError if there is not enough memory to completely load the class.
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
Well there are actually practical limits on a variety of entities, like size of identifier names, numbers of methods, limits on parameter lists, etc; So there are upper limits on how big a class file can be.
Details here:
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#88659
(Thanks to zakaria haque for the link)
[ March 12, 2002: Message edited by: Rob Ross ]

Rob
SCJP 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Max size of java class
 
Similar Threads
An error in K&B certification book
size of a file
Such thing as dynamic array's in java?
size of a blank class
Inheritance --- Assigning Sub class Object to Super Class Reference