cheerpjRunLibrary
Load a Java Library
Loads a Java library for use in JavaScript. See library mode for more information.
Parameters
- classPath (
string
) - The path to the library’s jar file in the virtual filesystem. Pass an empty string to load the standard library only.
Returns
cheerpjRunLibrary
returns a Promise which resolves to a CJ3Library object.
Examples
Using the standard library
Using a custom library
Let’s say we had a library called example.jar
compiled from the following class:
With example.jar
being available on the web server at /example.jar
, we could use it like so: