Fork me on GitHub
#reveal
<
2021-04-30
>
richiardiandrea18:04:04

Hi there, I am trying to use reveal for the first time and I am getting this error

Downloading: borkdude/edamame/0.0.11-alpha.28/edamame-0.0.11-alpha.28.pom from clojars
Downloading: borkdude/edamame/0.0.11-alpha.28/edamame-0.0.11-alpha.28.jar from clojars
Downloading: borkdude/sci/0.2.1-alpha.1/sci-0.2.1-alpha.1.jar from clojars
Downloading: zprint/zprint/1.1.1/zprint-1.1.1.jar from clojars
Syntax error (ClassNotFoundException) compiling at (cljfx/coerce.clj:1:1).
javafx.event.EventHandler

vlaaad18:04:02

Are you on java 8?

vlaaad18:04:18

Looks like a jdk without javafx built in

vlaaad18:04:22

Using java 8, you need a jdk that bundles javafx.

richiardiandrea18:04:15

I vlaad thanks, I have just googled around and I see, yes I am on java 8

richiardiandrea18:04:30

huge thread here https://stackoverflow.com/questions/18547362/javafx-and-openjdk seems like a non-trivial thing to do 😄 Will read that

seancorfield19:04:05

TL;DR: for Java 8, either use Oracle’s JDK (ugh!) or Azul Systems’ Zulu JDK 8 with the JavaFX bundle.

richiardiandrea19:04:51

yep it looks like Zulu is what i want 😄

richiardiandrea19:04:45

sdk install java 8.0.282.fx-zulu worked!

2
👍 2
onetom11:05:37

@U0C8489U6 where is the sdk command coming from?

imre11:05:40

sdkman I believe

❤️ 2
imre13:05:38

Hmm. I tried sdkman and it's great for managing java installations

imre13:05:09

However, using java 8.0.282.fx-zulu still results in

imre13:05:23

(require 'vlaaad.reveal)
=> nil
(add-tap (vlaaad.reveal/ui))
Syntax error (IllegalArgumentException) compiling . at (cljfx/jdk/platform.clj:6:5).
No matching method startup found taking 1 args for class javafx.application.Platform

vlaaad13:05:39

are you using tools-deps? you might need to clear .cpcache first

imre13:05:21

I am, tried that. Also deleted gitlibs and m2 to be sure. But let me try it in an empty project

imre13:05:15

hmm interesting. it worked with the empty project

imre13:05:22

I'll need to look at my dep tree

vlaaad14:05:13

maybe you deleted wrong .cpcache?

vlaaad14:05:36

or at the wrong time

vlaaad14:05:53

deletion has to happen after changing the jdk

imre15:05:39

I did some more investigation and it appears to be specific to launching the repl from Cursive

vlaaad15:05:02

Can you show your run configuration?

vlaaad15:05:49

Also does cursive project use this zulu jdk? Cursive jdk is not the same as cli java version

imre15:05:40

Yeah, I set the project sdk to that zulu one

imre15:05:51

Here's the run config. Went for clojure.main with deps to be as barebones as possible.

imre15:05:11

And the entire repl output:

imre15:05:21

Starting clojure.main REPL...
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/bin/java -Dclojure.libfile=/private/var/folders/yq/pzs9fnnj5g715j73kxglggcjtyvz55/T/libfile5.libs "-javaagent:/Applications/IntelliJ IDEA 2020.1 CE  IDEA 2020.1 CE " -Dfile.encoding=UTF-8 -classpath src:/Users/ikoszo/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar:/Users/ikoszo/.m2/repository/vlaaad/reveal/1.3.209/reveal-1.3.209.jar:/Users/ikoszo/.m2/repository/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar:/Users/ikoszo/.m2/repository/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar:/Users/ikoszo/.m2/repository/cljfx/cljfx/1.7.12/cljfx-1.7.12.jar:/Users/ikoszo/.m2/repository/cljfx/css/1.1.0/css-1.1.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark/0.62.0/flexmark-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-ext-autolink/0.62.0/flexmark-ext-autolink-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-ext-wikilink/0.62.0/flexmark-ext-wikilink-0.62.0.jar:/Users/ikoszo/.m2/repository/org/apache/commons/commons-lang3/3.10/commons-lang3-3.10.jar:/Users/ikoszo/.m2/repository/cljfx/cljfx/1.7.12/cljfx-1.7.12-jdk11.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-base/15.0.1/javafx-base-15.0.1.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-controls/15.0.1/javafx-controls-15.0.1.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-graphics/15.0.1/javafx-graphics-15.0.1.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-media/15.0.1/javafx-media-15.0.1.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-web/15.0.1/javafx-web-15.0.1.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-ast/0.62.0/flexmark-util-ast-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-builder/0.62.0/flexmark-util-builder-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-collection/0.62.0/flexmark-util-collection-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-data/0.62.0/flexmark-util-data-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-dependency/0.62.0/flexmark-util-dependency-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-format/0.62.0/flexmark-util-format-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-html/0.62.0/flexmark-util-html-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-misc/0.62.0/flexmark-util-misc-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-sequence/0.62.0/flexmark-util-sequence-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-visitor/0.62.0/flexmark-util-visitor-0.62.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util/0.62.0/flexmark-util-0.62.0.jar:/Users/ikoszo/.m2/repository/org/nibor/autolink/autolink/0.6.0/autolink-0.6.0.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-base/15.0.1/javafx-base-15.0.1-mac.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-controls/15.0.1/javafx-controls-15.0.1-mac.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-graphics/15.0.1/javafx-graphics-15.0.1-mac.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-media/15.0.1/javafx-media-15.0.1-mac.jar:/Users/ikoszo/.m2/repository/org/openjfx/javafx-web/15.0.1/javafx-web-15.0.1-mac.jar:/Users/ikoszo/.m2/repository/org/jetbrains/annotations/15.0/annotations-15.0.jar:/Users/ikoszo/.m2/repository/com/vladsch/flexmark/flexmark-util-options/0.62.0/flexmark-util-options-0.62.0.jar clojure.main -r
Clojure 1.10.3
user=> (do
  (require 'vlaaad.reveal)
  (add-tap (vlaaad.reveal/ui)))
Syntax error (IllegalArgumentException) compiling . at (cljfx/jdk/platform.clj:6:5).
No matching method startup found taking 1 args for class javafx.application.Platform
user=> 

imre15:05:48

I raised this in #cursive as I think it's more an issue on that end

richiardiandrea18:05:10

yes it's sdk man, it worked on my side with cider but it's not usable cause the jdk 8 + fx does not seem to handle GDK_SCALE well

richiardiandrea18:04:15

has anybody ever seen this?

richiardiandrea18:04:37

the command cider is running is

clojure -M:reveal:dev -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.3"} cider/cider-nrepl {:mvn/version "0.26.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,vlaaad.reveal.nrepl/middleware]"]}}}' -M:cider/nrepl