Fork me on GitHub
#reveal
<
2022-05-04
>
Serafeim Papastefanos06:05:39

hello friends! I'm trying to use reveal on my project but i'm getting this:

user=> (require '[vlaaad.reveal :as r])
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:382).
javafx.scene.text.Font

vlaaad06:05:37

what does (System/getProperty "java.version") say?

Serafeim Papastefanos06:05:21

user=> (System/getProperty "java.version")
"1.8.0_242"

vlaaad06:05:10

did you switch between JDK versions recently?

Serafeim Papastefanos06:05:51

hmmm no i don't think so. should i try running the project with another jdk ?

Serafeim Papastefanos07:05:02

I tried with jdk 15, same:

C:\progr\clojure\cljcrd>clj  -Adev
Starting user.clj
Clojure 1.11.1
user=> (System/getProperty "java.version")
"15"
user=> (require '[vlaaad.reveal :as r])
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:435).
javafx.scene.text.Font

Serafeim Papastefanos07:05:13

hmmm. i'm on windows is this a problem ?

vlaaad07:05:03

please try clj -Sforce after switching the jdk

vlaaad07:05:29

windows should be fine…

Serafeim Papastefanos07:05:45

yey ! works with Sforce, it downloaded all deps! thank you!!

vlaaad07:05:01

in short: • your jdk 8 most probably does not have javafx included (it was part of the jdk) • for jdk 11+, reveal uses maven to pull javafx dependency (from jdk 11, javafx was removed from jdk and now should be used as a normal dependency) • clj needs -Sforce once after switching the JDKs because unlike maven artifacts, it does not have a concept of activating dependencies by external factors such as jdk version

vlaaad07:05:09

my pleasure 🙂

🙌 1
vlaaad07:05:56

if you need jdk 8, you should find one that bundles javafx…

Serafeim Papastefanos06:05:55

am i missing something ?