0

我已经在 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)

请帮助提前谢谢

4

1 回答 1

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 下的所有内容。

于 2014-03-17T17:02:17.163 回答