Get the addon's internal class loader. This may be used in combination with setClassLoader to create a custom class loader and load classes from it.
import { getClassLoader, setClassLoader, importClass } from 'java-bridge';const classLoader = getClassLoader();const URLClassLoader = importClass('java.net.URLClassLoader');const URL = importClass('java.net.URL');// This actually happens internally when appendClasspath is calledconst newClassLoader = new URLClassLoader([new URL('file:///path/to/my.jar')], classLoader);setClassLoader(newClassLoader); Copy
import { getClassLoader, setClassLoader, importClass } from 'java-bridge';const classLoader = getClassLoader();const URLClassLoader = importClass('java.net.URLClassLoader');const URL = importClass('java.net.URL');// This actually happens internally when appendClasspath is calledconst newClassLoader = new URLClassLoader([new URL('file:///path/to/my.jar')], classLoader);setClassLoader(newClassLoader);
Generated using TypeDoc
Get the addon's internal class loader. This may be used in combination with setClassLoader to create a custom class loader and load classes from it.
Example