/**
* Create a new script engine manager
* <p>
* <em>Note:</em> The context class loader will be set during the creation
* of the script engine. However the constructor
* {@link ScriptEngineManager#ScriptEngineManager(ClassLoader)} with the
* parameter <code>null</code> will still be used in order to look up the
* default script languages of the JRE.
* </p>
*
* @param contextClassLoader
* the context class loader to use
* @return a new instanceof a {@link ScriptEngineManager}
*/
public static ScriptEngineManager createManager ( final ClassLoader contextClassLoader )
{
try
{
return executeWithClassLoader ( contextClassLoader, new Callable<ScriptEngineManager> () {
@Override
public ScriptEngineManager call ()
{
return new ScriptEngineManager ( null );
}
} );
}
catch ( final Exception e )
{
// should never happen
throw new RuntimeException ( e );
}
}
Scripts.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:neoscada
作者:
评论列表
文章目录