Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What are the types of class loaders in Java? What is Java reflection API?

user-image
Question ajoutée par Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution
Date de publication: 2013/09/07

1.BootStrap ClassLoader

2.Extensions ClassLoader

3.System ClassLoader

khaled lela
par khaled lela , Angular typescript programmer , Klickdata

The Java Classloader is a part of the Java Runtime Environment that dynamically loads Java classes into the JVM, Usually classes are only loaded on demand

When the JVM is started, three class loaders are used:

  1. Bootstrap class loader ( loads the core Java libraries)
  2. Extensions class loader ( loads the code in the extensions directories)
  3. System class loader ( loads code found on java.class.path)

Source : wikipedia

Bassem Zohdy
par Bassem Zohdy , Java Chief Architect , Crossover

Copied:

When the JVM is started, three class loaders are used:

  1. Bootstrap class loader
  2. Extensions class loader
  3. System class loader

The bootstrap class loader loads the core Java libraries located in the <JAVA_HOME>/jre/lib directory. This class loader, which is part of the core JVM, is written in native code.

The extensions class loader loads the code in the extensions directories (<JAVA_HOME>/jre/lib/ext, or any other directory specified by the java.ext.dirs system property). It is implemented by the sun.misc.Launcher$ExtClassLoader class.

The system class loader loads code found on java.class.path, which maps to the CLASSPATH environment variable. This is implemented by the sun.misc.Launcher$AppClassLoaderclass.

 

Reflection Api, some lib give you facility to deal with classes not loaded yet  with its name, and give you ability to create object of it or call static method from these classes.

More Questions Like This