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
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