1
votes

I want to include some custom java classes in my clojure project. So I created a directory like src/java/subclass containing my java file. The clojure code is at src/subclass. I added :java-source-paths ["src/java"] to project.clj. But when I run lein repl I am getting the following error.

Java compiler not found; Be sure to use java from a JDK
rather than a JRE by modifying PATH or setting JAVA_CMD.

I am having JDK installed. javac -version gives javac 1.8.0_91. If I remove the :java-source-paths line lein repl runs fine. How can I include custom java files to my project?

Windows 7
Leiningen 2.7.1 on Java 1.8.0_91 Java HotSpot(TM) 64-Bit Server VM

Update: I tried lein run with the clj-antlr demo project, but the same issue. So this issue is not specific to my project setup.

1

1 Answers

0
votes

Works when JAVA_CMD is added. #2228