我是drool planner的新手,尝试使用runExamples.bat运行示例,但是当尝试在exclipse中导入该示例并尝试运行时,出现以下异常
Exception in thread "main" java.lang.IllegalStateException: The directory dataDir (D:\OfficeWork\Eclipse_work\Cloudbalancing2\data\cloudbalancing) does not exist. The working directory should be set to the directory that contains the data directory. This is different in a git clone (drools-planner/drools-planner-examples) and the release zip (examples).
at org.drools.planner.examples.common.business.SolutionBusiness.updateDataDirs(SolutionBusiness.java:101)
at org.drools.planner.examples.common.app.CommonApp.createSolutionBusiness(CommonApp.java:55)
at org.drools.planner.examples.common.app.CommonApp.<init>(CommonApp.java:35)
at org.drools.planner.examples.cloudbalancing.app.CloudBalancingApp.<init>(CloudBalancingApp.java:27)
at org.drools.planner.examples.cloudbalancing.app.CloudBalancingApp.main(CloudBalancingApp.java:33)发布于 2013-09-24 15:38:47
对于OptaPlanner 6.0.0.CR4,我把异常消息说得更清楚了:
java.lang.IllegalStateException: The directory dataDir (...) does not exist.
The working directory should be set to the directory that contains the data directory (which is not the data directory itself).
The working directory is different in a git clone (optaplanner/optaplanner-examples) and the release zip (examples).
In an IDE (IntelliJ, Eclipse, NetBeans), open the "Run configuration" to change the field "Working directory".至于你的第二个问题:
你在使用eclipse drools插件吗?尝试禁用它。该DRL没有问题,但是eclipse drools插件可能会错误地将其标记为错误。请注意,Eclipse实际上并不编译DRL,因此启用eclipse drools插件的唯一好处是DRL中的语法着色。
https://stackoverflow.com/questions/18961928
复制相似问题