java

mathpunk 2023-01-09T21:55:39.456329Z

I’m fuzzy on how to add a Java library to a Clojure project. It’s this one https://github.com/DataDog/datadog-api-client-java Do I need to compile the Java, like discussed https://gamlor.info/posts-output/2019-10-24-compile-java-with-clojure-deps/en/?

mathpunk 2023-01-10T22:13:16.105419Z

thanks!

emccue 2023-01-10T00:41:23.538419Z

Java projects are published as compiled jars generally

emccue 2023-01-10T00:41:39.187089Z

so you should just need to add the maven dependency to your deps.edn

jumar 2023-01-10T07:52:53.943319Z

It's very similar to using a Clojure library. You can find it in http://mvnrepository.com -> https://mvnrepository.com/artifact/com.datadoghq/datadog-api-client The page also contains an example code for leiningen: https://mvnrepository.com/artifact/com.datadoghq/datadog-api-client/2.6.0

[com.datadoghq/datadog-api-client "2.6.0"]
For deps.edn you would use an equivalent:
com.datadoghq/datadog-api-client {:mvn/version "2.6.0"}