I have a Clojure/Lein project, and I am successfully using a Java class I created (in ./src/com/mypackage/MyClass.java
) in my Clojure code via the usual Java interop paradigm. But now I want to enhance MyClass, so in MyClass I want to import a Java package I installed via Maven via the project.clj
dependencies list, but import javax.mail.Message
and the like give an error: "The import javax.mail cannot be resolved". I'm admittedly very green at Java and the JVM. How can I get MyClass to know about stuff I installed via Maven via the project.clj
dependencies list.
(I am already successfully using Java packages I installed via Maven via the project.clj
dependencies list in my Clojure code.)
Here are my dependencies from project.clj
:
:dependencies [[org.clojure/clojure "1.10.0"]
[clj-http "2.0.0"]
[cheshire "5.9.0"]
[org.jsoup/jsoup "1.8.3"]
[javax.mail/javax.mail-api "1.6.0"]
[com.amazonaws/aws-java-sdk "1.11.714"]]
project.clj
file (esp the:dependencies
section)? – Alan Thompson