This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-09
Channels
- # aws (3)
- # bangalore-clj (3)
- # beginners (40)
- # boot (53)
- # cider (1)
- # cljs-dev (124)
- # cljsrn (22)
- # clojure (105)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-russia (35)
- # clojure-spec (9)
- # clojure-uk (30)
- # clojurebridge (25)
- # clojurescript (107)
- # datomic (18)
- # dirac (21)
- # events (6)
- # hoplon (29)
- # leiningen (5)
- # off-topic (40)
- # om (17)
- # onyx (25)
- # parinfer (2)
- # pedestal (4)
- # perun (2)
- # planck (1)
- # protorepl (6)
- # re-frame (18)
- # reagent (15)
- # ring-swagger (4)
- # specter (2)
- # test-check (7)
- # testing (3)
- # untangled (45)
- # vim (2)
@pawel.kapala @curlyfry wow! Thanks. I really appreciate it.
Hi everyone!... I am confused about how to include java code in an application. Right now, my sources are separated in two folders: src/java and src/clojure. I want to import a class that I wrote from a clojure namespace, however, when I run lein javac or lein repl I receive an exception with a message telling me that the class was not found.
Exception in thread "main" java.lang.ExceptionInInitializerError at clojure.main.<clinit>(main.java:20) Caused by: java.lang.ClassNotFoundException: org.tempuri.Core, compiling:(scv2backend/component/signature_soap_client.clj:1:1)
From what I have read, first I should run lein javac to compile my java sources and the run lein repl, but for some reason isn't working.
@rcanepa might be an issue with your project.clj too, would be useful to see the relevant parts / all of it.
I removed the import statement and the repl started without problems. Then I added back the import statement, reloaded the repl and everything worked fine again. That is very weird. I guess now the java sources are compiled so I can import them.
You might have a problem if you do lein repl
then lein javac
, you need to make sure javac
finishes first. All I can think of
Why does f v are not resolved here :
(def mapset
"works like a map but returns a set"
[f v]
(f v )
)
hmm, when I do (mapset inc [1 1 2 2])
I see this error : ClassCastException clojure.lang.PersistentVector cannot be cast to java.lang.Number clojure.lang.Numbers.inc (Numbers.java:112)
remember that excersizes 4,5,6 are considered “difficult” at that point and you can revisit them after reading the next two chapters