How to add to the classpath of Scriptengine?

J

jeanmarc.vanel

By default the user classes (except those from the JRE) are not
exposed to the script engine.
Of course one can with put() add any object to the script engine,
including factories or ClassLoader.

Thus one is not blocked. But it would be more comfortable to make a
new directly for the class needed.
Perhaps you will answer me that new is a bad practice, and to use
instead factories as much as possible. And you would be right! But in
my case I generate Javascript.

Note that this is possible throught command line arguments when
running jrunscript.
But I couldn't find the source code for jrunscript.

Thanks, and Merry Christmas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top