Fork me on GitHub

Cross-posting from #rebl: Trying to run REBL from within Cursive. It works fine from the command line, so I think my deps.edn is correct, but when using the setup for cursive from the REBL wiki I'm getting java.lang.ClassNotFoundException: javafx.fxml.FXMLLoader


I noticed the console doesn’t do \r correctly; but it seems like a IntelliJ issue ( are there known workarounds?


i have a clojurescript nrepl running via shadow cljs. i've followed the guide [1] and can connect just fine, but cursive complains when i try to load a cljs name space: Cannot load ClojureScript file into Clojure REPL. is there a way around this? 🙂 [1]


@joshkh there’s a little dropdown menu in the toolbar at the top of the REPL window that you can change from CLJ to CLJS to let cursive know what’s on the other end of your nrepl.


nice! okay, that got me a little farther, but now there's another error: No reader function for tag js:

(ns server.main)

(defn handler [_ _ cb]
  (cb nil
      #js {:statusCode 200
           :body       (js/JSON.stringify "Hello!")}))
Loading src/server/main.cljs... 
Syntax error reading source at (main.cljs:6:53).
No reader function for tag js


@holyjak re: your question about the datomic stubs jar, that is no longer required in recent Cursive versions. Instead, you’ll be prompted to build the stubs automatically when using datomic and other similar libraries.

👍 4

@dave.dixon I’ll try to reproduce that today.


FYI, seems to work with Java 8. Unfortunately, REBL doesn't render correctly in Java 8 on a HiDPI display.


@dave.dixon When you run your REPL, you can look at the classpath used by un-folding the second line in the console. Are the JavaFX jars there?


I can’t see why it wouldn’t be able to find that class then - that’s very strange.


Is this maybe the issue of a long classpath getting truncated on windows?


But it works from the command line, so maybe not.


There’s an option to control that in the run configuration - if you think that might be the problem, try “classpath file” under “Shorten command line”.


Maybe a classloader issue? Here's part of the info that is shown with the exception: Caused by: java.lang.ClassNotFoundException: javafx.fxml.FXMLLoader at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass( at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass( at java.base/java.lang.ClassLoader.loadClass( at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName( at clojure.lang.RT.classForName( at clojure.lang.RT.classForNameNonLoading( at cognitect.rebl.renderers$loading__6706__auto____12012.invoke(renderers.clj:3) at cognitect.rebl.renderers__init.load(Unknown Source) at cognitect.rebl.renderers__init.<clinit>(Unknown Source) ... 71 more


@jeroen.dejong I don’t think so, unfortunately.


I have a local REPL that insists on running clojure 1.9. Running at the command line using clj runs 1.10. Double-checked the various deps.edn files, where else would I look?


@dave.dixon Oh, you’re using the “Use t.d.a directly” REPL option on Windows, right? I just realised that I haven’t updated the bundled system deps.edn, so that will be pulling in Clojure 1.9. I’ll fix that, and also make it overridable so that you can choose another file if required.


In the meantime, one workaround is to specify the Clojure version in either your user deps.edn or your project one.

👍 4