Fork me on GitHub
#clojurescript
<
2022-10-08
>
Hankstenberg09:10:08

Hi everybody 🙂 When I'm trying to run:

npx shadow-cljs node-repl
I'm getting the error message below. JAVA_HOME and alias are set to JDK17 correctly.. however I did that after I ran into the issue for the first time, so there may be some wrongly compiled binaries lying around.. but where? I tried to add a system.properties file with java.runtime.version=17 already, that doesn't seem to help.
shadow-cljs - config: /home/hankstenberg/dev/acme/shadow-cljs.edn
Execution error (UnsupportedClassVersionError) at java.lang.ClassLoader/defineClass1 (ClassLoader.java:-2).
com/google/javascript/jscomp/CompilerOptions has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Full report at:
/tmp/clojure-7361894805321107182.edn

thheller15:10:30

what does java -version and npx shadow-cljs info give you?

thheller15:10:51

that error is pointing to an older java version being used. you cannot change the java version via properties

thheller15:10:10

maybe you didn't reload your env after changing JAVA_HOME?

thheller15:10:27

or its still pointing to an older version via PATH?

Hankstenberg18:10:03

Thanks for always being there Thomas! I indeed had a jdk-8 on my PATH, but that wasn't it. But I had totally forgotten that on top of archlinux-java I had been using a tool called "sdkman" for a while... jdk8 was still the default in that tool.

Hankstenberg18:10:18

Now it's working, thanks again 🙂

👍 1
Dallas Surewood10:10:03

Has anyone found a good workflow for using evaluating clojure and clojurescript code with the same Repl?

Ben Lieberman15:10:23

Idk if this is what you mean exactly but I start my REPL with npx shadow-cljs clj-repl and connect to that in VSCode and it switches between a CLJ and CLJS REPL based on the kind of buffer I'm in

Ben Lieberman15:10:05

It works well for me though I'm a newb hacking together small scale projects