• Post Reply Bookmark Topic Watch Topic
  • New Topic

loading the class  RSS feed

 
anish jain
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have heard and read many times that a class is loaded first and then something something.
I want to know what it means when we say that class needs to be loaded or loading the class.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anish jain wrote:I want to know what it means when we say that class needs to be loaded or loading the class.


classes are loaded into JVM by class loader as need basis. i.e, reading and verifying the byte code in JVM. class loading-thre are 3 process happened 1. loading 2.linking 3..initializing,

after byte coded are loaded, JVM ceates Java.land.Class object for that class, then JVM loads other class which referenced by this class. typically JVM finds the referenced class from constant pool of .class file. and after linking(loaded the all referenced classes) jvm initialize the default value for classes instance variable.

for more details: search in google
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!