Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Size of class file

 
punna Kumar
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
is there any restriction to size of class file in java.i am faceing the out of memory issues in my WSAD when the size of class file is incresed.


any one have a idea?


ravi
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beta Punna Kumar

I cann't Understand what you really want to know it will be better for you to sepecify the code and exact error so that we can analyze and clear your understanding.

 
punna Kumar
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your replay

I am using WSAd 5.1.2 for deveoping environment. if my code exceded the 5000 lines of code the out of memory is coming.

Ravi.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah... what are you doing that requires that much code in one class? That sounds like a class that really needs to be refactored into smaller classes. How do you go about maintaining somethign that size? Is it all methods? Huge String literals maybe? What?
 
punna Kumar
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah your right,
it's bean class seter and getter methods.these all methods are used throught of my project. to avoid the duplicate the same methods in different beans we create this class. it's like a base class.


Ravi
 
Henry Wong
author
Marshal
Pie
Posts: 20999
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Related to the original question, but along a different track...

Eclipse is just a Java application, have you tried starting it with a bigger heap?

Henry
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, when exactly does the memory problem occur? When compiling? When you run? Does it happen as soon as the class loads, or sometime later? For example, is it possible for you to create at least one instance of this class before the error occurs?
 
punna Kumar
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for replay

i work around to set the java heap size set to -Xmx512m -Xms20m. due to this one my entire system will become very slow. i mean i unable to open other application.

i would like to know how quick i can slove the problem. is any other way to find out in WSAD how many instances are getting created for this class.

Ravi.
 
Paul Clapham
Sheriff
Pie
Posts: 20958
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is extremely unlikely that you could create a class that is so large that it instantly uses up a multi-megabyte heap. It is far more likely that your question "how many instances are getting created for this class" is the correct one. And the other question is "why are they being stored permanently".

As far as I know, WSAD includes profiling. I have never used it, though, so I can't tell you anything more about it. I'm sure the WSAD help files have a lot about profiling.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic