Each REM plugin has its server-side classes loaded in a child ClassLoader with REM’s main ClassLoader as its parent. By default, this is a simple URLClassLoader which delegates to REM’s class loader first before attempting to load a class from the plugin itself.

If your plugin needs to use a different version of a third-party library that is bundled with REM, it must specify that it requires the plugin-first class loader. This reverses the delegation order so that your plugin’s class loader will be checked first before delegating to REM’s class loader.

Note It is not possible to override the guice library that is bundled with REM as this is critical to the operation of REM.

1

Open your plugin’s build/compile.xml Ant build script in an editor and add an entry to the jar’s manifest.

For example:

            <manifest>
                <attribute name="Short-Name" value="example"/>
                <attribute name="Version" value="${plugin.version}"/>
                <attribute name="Description" value="${plugin.description}"/>
                <attribute name="Plugin-First-Class-Loader" value="true"/>
            </manifest>

2

Rebuild your plugin and install it into REM.

Your plugin’s classes will now take precedence over those bundled with REM.

Previous page Next page