在 Eclipse 中构建 Drools 4 项目时出现问题
我在编译 drools 4 项目时遇到问题。我在规则文件中收到错误,指出
Only a type can be imported. <<MyClassName>> resolves to a package
增量编译器因此无法工作。如何修复这些错误或让 Eclipse 忽略它们?
I'm having trouble compiling a drools 4 project. I'm getting errors in the rules file saying
Only a type can be imported. <<MyClassName>> resolves to a package
The incremental compiler isn't working because of this. How do I fix the errors or get eclipse to ignore them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从 drools 3.06 迁移到 4.0.7,那么你使用的 eclipse 和 drools 是什么版本?
这可能与类路径问题有关:
解决方案是:
This issue was mentioned for a migration from drools 3.06 to 4.0.7, so what version of eclipse and drools are you using?
This might be related to a classpath issue:
The solution was:
确保您从规则中使用的 MyClassName 或任何其他类位于 jar 文件中,并且该 jar 文件位于类路径中。
Ensure that the MyClassName or any other class(es) that you use from the rule are in a jar file and the jar file is in classpath.
嗯,我清理了项目并解决了问题。
Hmmm, I cleaned the project and that resolved the problem.