tools-deps 2024-08-09

I'm trying to follow https://clojure.org/guides/tools_build#_mixed_java_clojure_build. I have some java sources that I got from running jextract and I want to use them in my Clojure code.

Wait, never mind. There actually are class files under /target/classes. They just don't show up in emacs dired mode.

with my emacs setup at least (which i think uses defaults in this regard), dired doesn't automatically refresh the contents, you have to press "g" in the dired buffer to see the latest contents

I was going to share the folder structure with tree and then I saw all the class files for the first time.

".class" was in dired-omit-extensions and dired-omit-files I don't think it's a matter of refreshing. I think I'm just fighting emacs. Thanks though.

👍 1

(remove-hook! 'dired-mode-hook #'dired-omit-mode) fixed it for me

I'm confused. I have class files in /target/classes. How do I add that to my classpath? I open a repl with cider-jack-in-clj and I want to use the java classes from my repl.

you could just put the class dir in :paths

Or put them in a jar, and put a separate entry in :deps with a :local/root pointing to the jar file

That's helpful.

Thank you!

👍 1