All versions of Clojure jars are reported as Clojure -1.7.0-RC1, regardless of the actual version

When I download a copy of Clojure ( 1.8.0

or any other version), either from Maven Central or the official site, it will claim the version 1.7.0-RC1

.

For example:

$ java -jar clojure-1.8.0.jar Clojure 1.7.0-RC1 user=>

It also appears that this is, in fact, the version that is being launched. Since the features that were added in 1.8.0 (in particular string/starts-with?

) are not available in repl (after import).

When an identical copy of the file (verified by shasum) is downloaded to a separate laptop, the correct version is executed.

I tested this with several versions including 1.8.0

, 1.9.0-alpha17

and 1.5.0-RC2

. They all report how 1.7.0-RC1

.

Additional Information:

$ java -version Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Using macOS version 10.12.3

.

+3


source to share


1 answer


Another (earlier) version of Clojure .jar

can load and override the command line (or classpath) value if you installed the older one Clojure 1.7.0-RC1

as "Java Extension" on macOS . In practice, your message about behavior comes from placing 1.7.0 .jar

in /Library/Java/Extensions/

or ~/Library/Java/Extensions/

(in your home directory).

A simple solution is to delete the file jar

from the Extensions folder.



The Java Development Guide for Mac actually warns of the dangers of using the Extensions directory, as it can lead to problems like this:

Try to include all your dependent libraries in your application rather than relying on the Java Extensions directory because its contents are not converted and cannot be used across multiple versions of the same library.

+3


source







All Articles