【问题标题】:How to run .clp file in jess如何在 jess 中运行 .clp 文件
【发布时间】:2014-03-17 16:28:24
【问题描述】:

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

请帮忙 提前致谢

【问题讨论】:

  • 如果你——而不是启动 Jess 或在终止 Jess 之后——在 shell 提示符下执行 ls examples/jess/sticks.clp 会发生什么?

标签: batch-file jess


【解决方案1】:

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

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

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

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

因为我已解压缩 /extra 下的所有内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-09
    • 1970-01-01
    相关资源
    最近更新 更多