如何在jess中运行.clp文件

时间:2014-03-17 16:28:24

标签: batch-file jess

我在linux上安装了jess试用版。我正在尝试运行示例.clp文件之一。我在jess文档中使用了批处理。但是我收到了一个错误。等,

Jess> (batch "examples/jess/sticks.clp")
Jess reported an error in routine batch
        while executing (batch "examples/jess/sticks.clp").
  Message: Cannot open file.
  Program text: ( batch "examples/jess/sticks.clp" )  at line 14.

Nested exception is:
examples/jess/sticks.clp (No such file or directory)

请帮忙 提前致谢

1 个答案:

答案 0 :(得分:1)

Jess与大多数其他程序没有任何不同:相对路径名相对于程序启动时生效的工作目录进行解释。所以,如果你已经完成了

$ pwd
/home/youser/play
$ /extra/Jess/bin/jess
Jess> (batch "examples/jess/sticks.clp")

Jess希望该文件位于/home/youser/play/examples/jess/sticks.clp中。最有可能的是,它不是。在我的系统上,我可能会成功使用

Jess> (batch "/extra/Jess/examples/jess/sticks.clp")

因为我已将所有内容解压缩到/ extra。