As of Clojure 1.9, the Clojure jar depends on two additional libraries 
(spec.alpha and core.specs.alpha). Using only the clojure jar is thus not 
sufficient. 

There are several ways to handle this, as described on the 
https://clojure.org/guides/getting_started page.

1. Use the new command line clj tools (linux install instructions on that 
page) - this will fetch the deps for you.
2. Do a local build into a single standalone jar (note this is a custom jar 
containing deps and is different than just the artifact you downloaded).
3. Use a build tool like leiningen or boot that will fetch the deps for you.
4. Download clojure and its deps manually and build your own custom 
classpath. (not recommended)

On Monday, May 21, 2018 at 11:17:37 AM UTC-5, Jesús Gómez wrote:
>
> Simply: 1.7 works but 1.9 not.
>
> Test:
>
> $ # Download Clojure 1.7, 1.8 and 1.9 jars
> $ seq 7 9 | xargs -L1 -I% wget 
> http://repo1.maven.org/maven2/org/clojure/clojure/1.%.0/clojure-1.%.0.jar
> $ seq 7 9 | xargs -L1 -I% java -jar clojure-1.%.0.jar -e '"1.%.0 is 
> Working"'
> "1.7.0 is Working"
> "1.8.0 is Working"
> Exception in thread "main" java.lang.ExceptionInInitializerError
> ...
> Caused by: java.io.FileNotFoundException: Could not locate 
> clojure/spec/alpha__init.class or clojure/spec/alpha.clj on classpath.
> ...
>
> I've been trying to learn Clojure, so I've installed it in many ways:
>
>  * Lein - Not working due some SSL credential
>  * boot vian nix - Working but ... I don't remember the why already... 
> something related with CIDR?... not important for this post anyways
>  * via apt - Working but I can't make a simple clojure -m hello to work
>
> So I tried to understand the basics (No maven, no 3rd parties, etc.) and 
> found the mentioned problem.
>
> I was expecting it to work flawless and to not be affected on what I got 
> already installed in my system, but probably is the fact I installed 
> clojure via APT, which installed 1.9.0, that is causing the jar for 1.9.0 
> to fail and not the others.
>
> In any case... 1.9.0 jar is not working for me.
>
> Thank you.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to