ClassLoaders in Java:
Class loaders can be implemented by implementing the abstract class ClassLoader. They provide functionalities to load classes using their names as parameters at runtime.In order to retrieve the systems default class loader we can do the following:
ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
ClassLoader classClassLoader = ReflectableClass.class.getClassLoader();
Class reflectableClassInstanceLoaded = systemClassLoader.loadClass( "com.danibuiza.javacodegeeks.reflection.ReflectableClass" );
Class loaders can be implemented by implementing the abstract class ClassLoader. They provide functionalities to load classes using their names as parameters at runtime.In order to retrieve the systems default class loader we can do the following:
ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
ClassLoader classClassLoader = ReflectableClass.class.getClassLoader();
Class reflectableClassInstanceLoaded = systemClassLoader.loadClass( "com.danibuiza.javacodegeeks.reflection.ReflectableClass" );