liebke / cljr

cljr is a Clojure REPL and package management system.
236 stars 11 forks source link

No matching method found: setExecutable for class java.io.File #5

Closed jandot closed 14 years ago

jandot commented 14 years ago
Downloading: org/clojure/clojure/1.1.0-alpha-SNAPSHOT/clojure-1.1.0-alpha-SNAPSHOT.pom from clojure
Downloading: org/clojure/clojure/1.1.0-alpha-SNAPSHOT/clojure-1.1.0-alpha-SNAPSHOT.pom from clojure-snapshots
...
Created /Users/me/Documents/clj/clj.jar
Including clj.jar
Including ant-1.6.2.jar
Including ant-launcher-1.6.2.jar
...

However, in the "creating scripts" step, I get the following error:

No matching method found: setExecutable for class java.io.File

Here are the last line sent to the screen: ... Including wagon-provider-api-1.0-beta-2.jar Including xml-apis-1.0.b2.jar /Users/me/.clj / project.clj does not exist, clj must be initialized. The /Users/me/.clj/lib/ repository does not exist, needs to be initialized.

Initializing clj...
Creating clj home,  /Users/me/.clj ...
Copying clj-standalone.jar to /Users/me/.clj/clj.jar...
Creating /Users/me/.clj/project.clj file...
Creating script files...
Exception in thread "main" java.lang.IllegalArgumentException: No matching method found: setExecutable for class java.io.File
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:50)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at clj.main$clj_self_install.invoke(main.clj:249)
    at clj.main$clj.doInvoke(main.clj:451)
    at clojure.lang.RestFn.invoke(RestFn.java:411)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.RestFn.applyTo(RestFn.java:133)
    at clojure.core$apply.invoke(core.clj:540)
    at clj.main$_main.doInvoke(main.clj:475)
    at clojure.lang.RestFn.applyTo(RestFn.java:138)
    at clj.main.main(Unknown Source)

The installation worked yesterday on my other laptop. Could this have to do with the fact that I'm on another network now than yesterday? Or has something changed in the code?

liebke commented 14 years ago

The setExecutable method on File is new to Java 6. I need to indicate that clj is only compatible with Java 6.

jandot commented 14 years ago

That solves it, thanks! Had some issues first making java 1.6 the default on my mac but got it working. Is there a way to tell clj to use java 6 even though 1.5 is the default on your machine?