Some people might consider this an abuse, but for the record Rhino supports using custom class loaders via the Packages() constructor:

// create a custom class loader
var cl = new java.net.URLClassLoader([new java.net.URL("file:./foo.jar")],
java.lang.Thread.currentThread().getContextClassLoader());


// create a new "Packages" object encapsulating the class loader:
var fooJar = new Packages(cl);

// use classes from foo.jar:
importClass(fooJar.baz.Foo);

var foo = new Foo(1, 2, 3);
foo.someMethod();

Johann Romefort wrote:

Hi,

I would like to know if there is some way to enable class reloading for import called from the FlowScript, without restarting Tomcat?

Thanks in advance,

Johann






Reply via email to