reveal

Docs: https://vlaaad.github.io/reveal/ Source: https://github.com/vlaaad/reveal
richiardiandrea 2021-04-30T18:46:04.071200Z

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

onetom 2021-05-03T11:27:37.074200Z

@richiardiandrea where is the sdk command coming from?

imre 2021-05-03T11:56:40.074400Z

sdkman I believe

1❤️
imre 2021-05-03T13:24:38.074600Z

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

imre 2021-05-03T13:25:09.074800Z

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

imre 2021-05-03T13:25:23.075Z

(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

vlaaad 2021-05-03T13:32:39.075200Z

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

imre 2021-05-03T13:48:21.075400Z

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

imre 2021-05-03T13:51:15.075600Z

hmm interesting. it worked with the empty project

imre 2021-05-03T13:51:22.075800Z

I'll need to look at my dep tree

vlaaad 2021-05-03T14:35:13.076Z

maybe you deleted wrong .cpcache?

vlaaad 2021-05-03T14:36:36.076200Z

or at the wrong time

vlaaad 2021-05-03T14:36:53.076400Z

deletion has to happen after changing the jdk

imre 2021-05-03T15:15:18.076600Z

https://github.com/imrekoszo/reveal-zulu

imre 2021-05-03T15:15:39.076900Z

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

vlaaad 2021-05-03T15:30:02.077100Z

Can you show your run configuration?

vlaaad 2021-05-03T15:30:49.077300Z

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

imre 2021-05-03T15:37:40.077500Z

Yeah, I set the project sdk to that zulu one

imre 2021-05-03T15:38:51.077700Z

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

imre 2021-05-03T15:39:11.078100Z

And the entire repl output:

imre 2021-05-03T15:39:21.078300Z

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 <http://EAP.app/Contents/lib/idea_rt.jar=56941:/Applications/IntelliJ|EAP.app/Contents/lib/idea_rt.jar=56941:/Applications/IntelliJ> IDEA 2020.1 CE <http://EAP.app/Contents/bin|EAP.app/Contents/bin>" -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=&gt; (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=&gt; 

imre 2021-05-03T15:39:48.078500Z

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

richiardiandrea 2021-05-03T18:49:10.078800Z

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

richiardiandrea 2021-04-30T18:46:15.071400Z

has anybody ever seen this?

richiardiandrea 2021-04-30T18:47:37.071700Z

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

vlaaad 2021-04-30T18:48:02.071800Z

Are you on java 8?

vlaaad 2021-04-30T18:48:18.072Z

Looks like a jdk without javafx built in

vlaaad 2021-04-30T18:50:22.072200Z

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

richiardiandrea 2021-04-30T18:51:15.072400Z

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

richiardiandrea 2021-04-30T18:52:30.072600Z

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

seancorfield 2021-04-30T19:00:05.072900Z

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

richiardiandrea 2021-04-30T19:02:51.073100Z

yep it looks like Zulu is what i want 😄