1
代码:Clojure中不能调用createTempDirectory Clojure中
(import '(java.nio.file Files))
(Files/createTempDirectory "Test")
有错误:
CompilerException java.lang.IllegalArgumentException: No matching method: createTempDirectory, compiling:xxxx
没有为createTempDirectory
一个字符串参数,我'm using java 1.7.0
从clojure中调用具有可变参数的java方法时,不能省略变量参数。您必须将'FileAttribute'的数组作为第二个参数,请参阅http://stackoverflow.com/questions/11702184/how-to-handle-java-variable-length-arguments-in-clojure。 – ymonad 2014-11-05 02:54:03
谢谢@ymonad,那应该是对的 – 2014-11-05 03:25:02