command line tool clojure raises java.lang.ClassNotFoundException: clojure.main

71 views
Skip to first unread message

Johannes

unread,
Jul 19, 2018, 10:28:04 AM7/19/18
to Clojure
I suppose I have installed the command line tools on my Mac with

brew install clojure

as described in the Getting Started Guide.

If I try clj I get

Clojure 1.9.0

user=> 

fine!

If I try clojure I get

Fehler: Hauptklasse clojure.main konnte nicht gefunden oder geladen werden

Ursache: java.lang.ClassNotFoundException: clojure.main


Any hints, what is going wrong?

Johannes

Alex Miller

unread,
Jul 19, 2018, 10:41:24 AM7/19/18
to Clojure
It might be good to check that `clojure` actually points to what you think it points to. Check `which clj` and `which clojure` to make sure they are coming out of the same directory.

Johannes

unread,
Jul 19, 2018, 12:15:13 PM7/19/18
to Clojure


Am Donnerstag, 19. Juli 2018 16:41:24 UTC+2 schrieb Alex Miller:
It might be good to check that `clojure` actually points to what you think it points to. Check `which clj` and `which clojure` to make sure they are coming out of the same directory.
I think they do:

JohMBAir:~ johannes$ which clj

/usr/local/bin/clj

JohMBAir:~ johannes$ which clojure

/usr/local/bin/clojure

JohMBAir:~ johannes$ 

Johannes

unread,
Jul 19, 2018, 1:01:43 PM7/19/18
to Clojure
Now, I've found the source of the problem. I'd got an "old" alias named clojure in my .profile. Now all works fine.

Johannes
Reply all
Reply to author
Forward
0 new messages