Browse Source

specify that PluginClassLoader is a Parent Last ClassLoader - it loads the classes from the plugin's jars before delegating to the parent class loader

pull/34/merge
Decebal Suiu 10 years ago
parent
commit
7ae4ccd263
  1. 3
      README.md
  2. 2
      pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java

3
README.md

@ -71,7 +71,8 @@ It's very simple to add pf4j in your application:
In above code, I created a **DefaultPluginManager** (it's the default implementation for In above code, I created a **DefaultPluginManager** (it's the default implementation for
**PluginManager** interface) that loads and starts all active(resolved) plugins. **PluginManager** interface) that loads and starts all active(resolved) plugins.
Each available plugin is loaded using a different java class loader, **PluginClassLoader**. Each available plugin is loaded using a different java class loader, **PluginClassLoader**.
The **PluginClassLoader** contains only classes found in **PluginClasspath** (default _classes_ and _lib_ folders) of plugin and runtime classes and libraries of the required/dependent plugins. The **PluginClassLoader** contains only classes found in **PluginClasspath** (default _classes_ and _lib_ folders) of plugin and runtime classes and libraries of the required/dependent plugins.
This class loader is a Parent Last ClassLoader - it loads the classes from the plugin's jars before delegating to the parent class loader.
The plugins are stored in a folder. You can specify the plugins folder in the constructor of DefaultPluginManager. If the plugins folder is not specified The plugins are stored in a folder. You can specify the plugins folder in the constructor of DefaultPluginManager. If the plugins folder is not specified
than the location is returned by `System.getProperty("pf4j.pluginsDir", "plugins")`. than the location is returned by `System.getProperty("pf4j.pluginsDir", "plugins")`.

2
pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java

@ -22,6 +22,8 @@ import java.util.List;
/** /**
* One instance of this class should be created by plugin manager for every available plug-in. * One instance of this class should be created by plugin manager for every available plug-in.
* This class loader is a Parent Last ClassLoader - it loads the classes from the plugin's jars before delegating
* to the parent class loader.
* *
* @author Decebal Suiu * @author Decebal Suiu
*/ */

Loading…
Cancel
Save