Hi,
I have a very basic question on classloader. I have searched this forum and have these questions:
Defintion :Classloader is a
java class which is responsible for loading a java class and making it available to JVM.
Question
1. What do we mean by "loading a java class". The java classes (ie .class files) are already in classpath. Isn't JVM smart itself to read the .class files and then execute them. Please clarify.
2. When the class (ie MyAccount.class file) is "loaded" , a java class of type "java.lang.Class" is created and that is used by JVM for executing the MyAccount.class. Why is this java.lang.Class required. I could not understand the reason.
3. What do we mean by "making it available". Does it mean that the class bytecode is provided to JVM to execute.
Any help on this will be greatly appreciated. I have read a number of of articles on net regarding classloaders. My confusion is on basic concept of "loading a .class file". I could not find any reference explaining this.
Thanks,