Installed Java 9 on my Macbook, then I got:
shadow-cljs - re-building aot cache on startup, that will take some time.
shadow-cljs - starting ...
Exception in thread "main" java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(aleph/http/client_middleware.clj:420:7)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6953)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6934)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler.analyze(Compiler.java:6685)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3855)
during running:
shadow-cljs watch app
in my existing project https://github.com/mvc-works/coworkflow
I would hold off on Java9.
It needs at least Clojure 1.9-beta1 but we can't use that yet since ClojureScript 1.9.908 doesn't support it yet. Need a new CLJS release first.
Looks like aleph is using a class that isn't available anymore, I'll look into it.
Did some quick tests with Java9.
It works if you add :jvm-opts to shadow-cljs.edn:
:jvm-opts
["--add-modules" "java.xml.bind"]
There is one new warning but besides that it works.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/Users/zilence/.m2/repository/io/netty/netty-all/4.1.11.Final/netty-all-4.1.11.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
So much for Java and not breaking backwards compatibility.
I can't use lein anymore so I'm downgrading again.
Actually I downgraded.
I think this can be closed since Clojurescript was upgraded to 1.10.238 in master which adds JDK 9 compatibility.
Indeed. FWIW I'm already on Java10 and everything appears to be working fine.
I'm getting the same warning:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by clojure.tools.nrepl.middleware.interruptible_eval$set_line_BANG_ to field java.io.FilterReader.in
WARNING: Please consider reporting this to the maintainers of clojure.tools.nrepl.middleware.interruptible_eval$set_line_BANG_
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I just recently upgraded to Java10. Should I downgrade?
@loganpowell you can ignore the warning and I think it might be due to older version of nrepl. Can you please share the version you are using ?
I don't know if this helps anyone else, but as per some guidance from @thheller I was able to stop these warnings in ProtoREPL (v 0.3.1) by eval'ing:
(shadow.cljs.devtools.api/node-repl)
Most helpful comment
Indeed. FWIW I'm already on Java10 and everything appears to be working fine.