从c:\(已安装该语言的磁盘)所在的另一个磁盘上的目录中执行“ Hello world”程序(https://jolielang.gitbook.io/docs/getting-started/hello_world)时,编译器找不到包含文件。
E:\ Documents \ Jolie-Examples> jolie myFirstJolieService.ol
(c:\ Jolie是所有库所在的位置,已添加文件夹)
编译器答案为:
jolie.lang.parse.ParserException:E:\ Documents \ Jolie-Examples \ myFirstJolieService.ol:1:错误:找不到文件:console.iol。找到令牌类型STRING,令牌内容console.iol 在jolie.lang.parse.AbstractParser.throwException(AbstractParser.java:241) 在jolie.lang.parse.OLParser.parseInclude(OLParser.java:690) 在jolie.lang.parse.OLParser._parse(OLParser.java:204) 在jolie.lang.parse.OLParser.parse(OLParser.java:185) 在jolie.Interpreter.buildOOIT(Interpreter.java:1251) 在jolie.Interpreter.init(Interpreter.java:1053) 在jolie.Interpreter.run(Interpreter.java:1139) 在jolie.Jolie.main(Jolie.java:60)
在线图书中的示例:
包括“ console.iol”
主要 { println @ Console(“ Hello,world!”)() }
“ Hello world”将是正确的答案。
如果我将程序放在另一个文件夹中,例如c:\ JolieCode,则编译器会正确找到包含的文件。