Writing a JavaFX project in Clojure
<p>I'm trying to understand how to properly setup JavaFX to work with a Clojure project. By reading various sources this is what I've come up with:</p>

<p>This is project.clj:</p>

<pre><code>(defproject cljfx "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]]
  :resource-paths ["lib/jfxrt.jar"]
  :main ^:skip-aot cljfx.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})
</code></pre>

<p>I don't know if I should use :resource-paths or add JavaFX to the classpath via the :dependencies vector...</p>

<p>This is core.clj:</p>

<p>I've basically translated to Clojure an example from this tutorial:</p>

<p><a href="http://docs.oracle.com/javafx/2/get_started/hello_world.htm" rel="nofollow">http://docs.oracle.com/javafx/2/get_started/hello_world.htm</a></p>

<pre><code>(ns cljfx.core
  (:gen-class
    :extends javafx.application.Application)
  (:import
    [javafx.application Application]
    [javafx.stage Stage]
    [javafx.scene Scene]
    [javafx.scene.control Button]
    [javafx.scene.layout StackPane]
    [javafx.event ActionEvent EventHandler]))


(defn -main [&amp; args]
  (Application/launch cljfx.core args))

(defn button [text]
  (doto (Button.)
    (.setText (str "Say " text))
    (.setOnAction (proxy [EventHandler] []
                    (handle [event]
                      (println text))))))

(defn -start [primaryStage]
  (let [root (doto (StackPane.)
               (-&gt; (.getChildren)
                   (.add (button "Hello World!"))))]
    (doto primaryStage
      (.setScene (Scene. root 300 250))
      (.show))))
</code></pre>

<p>This doesn't compile, and I don't know what I'm doing wrong... can you help me?</p>

<p>Here is the error:
<a href="http://pastebin.com/sYeK7MJd" rel="nofollow">http://pastebin.com/sYeK7MJd</a></p>