This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-21
Channels
- # announcements (1)
- # aws-lambda (62)
- # babashka (116)
- # beginners (67)
- # chlorine-clover (39)
- # cider (10)
- # cljs-dev (5)
- # clojure (30)
- # clojure-austin (2)
- # clojure-europe (2)
- # clojure-italy (6)
- # clojure-nl (24)
- # clojure-uk (28)
- # clojurescript (33)
- # data-science (6)
- # datascript (10)
- # datomic (5)
- # duct (39)
- # emacs (1)
- # events (8)
- # fulcro (9)
- # graalvm (29)
- # hoplon (7)
- # juxt (10)
- # malli (4)
- # off-topic (6)
- # pathom (10)
- # perun (1)
- # reagent (45)
- # shadow-cljs (5)
- # sql (14)
- # tools-deps (10)
- # xtdb (9)
How would I include the Java sources in the :path
of my deps.edn
configuration?
The sources are currently in a src.zip
file, from the install. Is it as simple as using "src.zip" to the :path
configuration? Or would I need to extract and a the specific directories relative to the Clojure project?
Also wondering how to include these sources to multiple projects, either using an alias in ~/.clojure/deps.edn
or creating a symbolic link to the src.zip file (or extracted directory).
Neither the clj
nor clojure
commands will do anything with Java sources, unless you somehow use them to run a program that looks for and does something with Java source files.
e.g. if you are using something like mevyn
program to compile Java source files: https://github.com/clojure/tools.deps.alpha/wiki/Tools
OR you can compile the src w/ javac
into target/classes
and add "target/classes"
to your :paths
I think the src.zip is referring to the ones that come with the jdk. They're used by cider to allow you to jump to source on java code.
@U05254DQM I think zip files are fine on the classpath. A :local/root should be fine.
@U09LZR36F that sounds what I am looking for, thank you.
It works. I have a deps.edn as follows
{:path
["src" "resources"]
:deps
{org.clojure/clojure {:mvn/version "1.10.1"}
;; Java 11 sources
java-sources {:local/root "/usr/lib/jvm/openjdk-11/lib/src.zip"}}}
I can now browse java sources in Spacemacs with clj-find-var
. Thanks everyone.