Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution
Date Posted: 2013/09/07

1.BootStrap ClassLoader

2.Extensions ClassLoader

3.System ClassLoader

khaled lela
by 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
by Bassem Zohdy , Senior Software Architect , HelpAG

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

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.