final ClassLoader classLoader = ObjectUtilities.getClassLoader(getClass());
final InputStream in =
classLoader.getResourceAsStream(BSHExpression.BSHHEADERFILE);
if (in == null)
{
throw new ModuleInitializeException("Unable to locate BSHHeaderFile. " + //$NON-NLS-1$
"This file is required to execute the BeanShellExpressions."); //$NON-NLS-1$
}
try
{
Class.forName("bsh.Interpreter", false, classLoader); //$NON-NLS-1$
}
catch (Exception e)
{
throw new ModuleInitializeException("Unable to load the bean shell interpreter class. " + //$NON-NLS-1$
"This class is required to execute the BeanShellExpressions."); //$NON-NLS-1$
}
ElementMetaDataParser.initializeOptionalExpressionsMetaData
("org/pentaho/reporting/engine/classic/core/modules/misc/beanshell/meta-expressions.xml");