ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution
تاريخ النشر: 2013/09/07
Murali mohan N
من قبل Murali mohan N

1.BootStrap ClassLoader

2.Extensions ClassLoader

3.System ClassLoader

khaled lela
من قبل 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
من قبل 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.

المزيد من الأسئلة المماثلة