This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Max size of java class

 
Paul Doherty
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the maximum size(in kilobytes) a java class can be? Indeed can a class be any size?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic