Fork me on GitHub
#tools-deps
<
2022-12-26
>
Søren Sjørup14:12:53

I’m trying depend on a jar I’ve built in deps.edn. But I’m getting Error building classpath. Manifest type not detected when finding deps for * in coordinate ... can someone point me to where this error message comes from so I can better debug? Thank you

seancorfield15:12:40

How are you specifying the dependency on the JAR, and did you check that the JAR contains a pom.xml file?

Søren Sjørup16:12:32

I’ve since found out that the directory structure inside my jar is not as intended… so sorry to bother you. Also no, I don’t have a pom.xml. I have this in my deps.edn

dk.zoren/jar {:local/root "libs/BTree.jar"}

Søren Sjørup16:12:46

I get Unsupported class file major version 61 after fixing the directory layout inside the jar. Thank you, and again sorry to bother.

seancorfield16:12:31

The latter says you have some code compiled on a more recent JDK than the one you're trying to run it on. 61 is JDK 17, so you'll need at least JDK 17 to run this.

Søren Sjørup17:12:43

Yes I found out. But I actually don’t really understand how it happend. I did compile the jar with java 17 and inside the vscode REPL the system property said "java.runtime.version" "17.0.5+8"

Søren Sjørup17:12:38

Now I’ve use asdf to install java and restarted VSCode, that fixed it for me.