Clojure can't find .clj in local directory, . and ./classes on CLASSPATH

后端 未结 5 1333
抹茶落季
抹茶落季 2020-12-05 03:13

When I evaluate (use \'hello) to load hello.clj, the REPL complains with the following error:

java.io.FileNotFoundException: Could not locate hello__init.cla         


        
5条回答
  •  独厮守ぢ
    2020-12-05 03:50

    when I'm working from the repl and want to load files i find i have to call something like this first:

    (add-classpath "file:///home/arthur/.../src/")
    (add-classpath "file:///home/arthur/.../build/")
    

    before the repl can find them on the classpath. I put these in a file that is not included in the jar file along with a statement that reloads everything from the other files. When I build a jar file i find I don't need to do this.

提交回复
热议问题