This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-27
Channels
- # announcements (11)
- # aws (1)
- # babashka (15)
- # beginners (345)
- # calva (5)
- # chlorine-clover (14)
- # clj-kondo (40)
- # cljfx (30)
- # clojure (174)
- # clojure-australia (6)
- # clojure-europe (64)
- # clojure-france (1)
- # clojure-nl (12)
- # clojure-uk (20)
- # clojurescript (29)
- # conjure (1)
- # core-async (53)
- # cryogen (3)
- # cursive (8)
- # datomic (12)
- # emacs (5)
- # events (4)
- # fulcro (27)
- # graalvm (1)
- # graphql (9)
- # helix (8)
- # keechma (11)
- # london-clojurians (1)
- # malli (12)
- # off-topic (12)
- # pathom (8)
- # portal (1)
- # re-frame (19)
- # reagent (13)
- # reitit (16)
- # ring-swagger (2)
- # sci (38)
- # shadow-cljs (31)
- # spacemacs (3)
- # specter (14)
- # sql (14)
- # tools-deps (31)
- # vim (4)
- # xtdb (9)
anybody know how to handle this error? Syntax error (ClassNotFoundException) compiling at (cljfx/coerce.clj:1:1). javafx.event.EventHandler
@b4 What JDK are you running on? Did you add the JavaFX dependencies to your project?
:deps {org.clojure/clojure {:mvn/version "1.10.1"} org.openjfx/javafx-controls {:mvn/version "15"} org.openjfx/javafx-base {:mvn/version "15"} org.openjfx/javafx-graphics {:mvn/version "15"} org.openjfx/javafx-media {:mvn/version "15"} org.openjfx/javafx-web {:mvn/version "15"} cljfx {:mvn/version "1.7.10"}
Hmm, I would have expected that to work. Maybe when @vlaaad is around, he can help...
When I create a new project with those deps and run a REPL and then do that require, it works 😐
(! 617)-> cat deps.edn
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.10.1"}
org.openjfx/javafx-controls {:mvn/version "15"}
org.openjfx/javafx-base {:mvn/version "15"}
org.openjfx/javafx-graphics {:mvn/version "15"}
org.openjfx/javafx-media {:mvn/version "15"}
org.openjfx/javafx-web {:mvn/version "15"}
cljfx {:mvn/version "1.7.10"}}
:aliases
{:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.0.0"}}}
:runner
{:extra-deps {com.cognitect/test-runner
{:git/url ""
:sha "b6b3193fcc42659d7e46ecd1884a228993441182"}}
:main-opts ["-m" "cognitect.test-runner"
"-d" "test"]}
:uberjar {:extra-deps {seancorfield/depstar {:mvn/version "1.1.128"}}
:main-opts ["-m" "hf.depstar.uberjar" "fx.jar"
"-C" "-m" "b4.fx"]}}}
(! 618)-> clj
Clojure 1.10.1
user=> (require '[cljfx.api :as fx])
nil
user=>
(that's on JDK 15 but it shouldn't make any difference)
(! 619)-> JAVA_HOME=$OPENJDK11_HOME clj
Clojure 1.10.1
user=> (System/getProperty "java.version")
"11.0.5"
user=> (require '[cljfx.api :as fx])
nil
user=>
Yup, works on openjdk 11 too.@b4, could it be that you used java 8 when creating the project, i.e. run clj ...
on java 8 so it created and cached a classpath using java 8, and then switched to java 15? In that case you need to use -Sforce
or just remove the caches manually
Clojure CLI versions are independent of Clojure versions. CLI 1.9.x is very old and a lot of changes and bug fixes have happened since then.
Clojure CLI versions are independent of Clojure versions. CLI 1.9.x is very old and a lot of changes and bug fixes have happened since then.