jar Pentaho数据集成用户定义的Java类
我创建简单的java类并将其导出到jar:
package test;
public class Test {
public Test() {
// TODO Auto-generated constructor stub
}
}
Jar文件添加到Pentaho中的lib文件夹(有许多Jar文件) 下一步我想在Pentaho数据集成中使用我的类,所以我创建了用户定义的Java类:
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
test.Test t = new test.Test();
return true;
}
单击“测试类”时,我将获得以下信息:
Line 3, Column 12: Class "test.Test" not found
所以我有一个问题:错误在哪里?为什么找不到该类
# 1 楼答案
/design-tools/data-integration/launcher
文件夹中。确保类路径和库定义了jar的路径。因为您已经将JAR文件放在了lib
文件夹中,所以请查找它李>我已将代码放在
libext
文件夹中,因此我已将:../libext
添加到类路径和库中。下面是代码剪报:如果它仍然抛出错误,请尝试再次检查Java代码。我想那里可能出了什么问题
也在here中记录了上述内容
希望有帮助:)