Fork me on GitHub

How would I include the Java sources in the :path of my deps.edn configuration? The sources are currently in a file, from the install. Is it as simple as using "" 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 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:


OR you can compile the src w/ javac into target/classes and add "target/classes" to your :paths


I think the 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.

👍 4

@U09LZR36F that sounds what I am looking for, thank you.


It works. I have a deps.edn as follows

 ["src" "resources"]

 {org.clojure/clojure {:mvn/version "1.10.1"}

  ;; Java 11 sources
  java-sources {:local/root "/usr/lib/jvm/openjdk-11/lib/"}}}
I can now browse java sources in Spacemacs with clj-find-var . Thanks everyone.


Remember that the location will vary for everyone :)