if you read the docs on the java command -cp and -jar are mutually exclusive options
On Sat, Dec 1, 2012 at 1:19 AM, Christian Sperandio < christian.speran...@gmail.com> wrote: > Thanks :) > I got my error. Because I declared my code as a class, my mind turned into > a object logic and I forget I was always in Clojure and in functional mind. > > I'd like understand an another point too. When I generate a jar with lein > uberjar, the code works. But if I do only a lein jar, the running failed > with a NoClassDef exception. Even if when I run the jar I use the java > command's option -cp to give the jfxrt.java's place. > Do I forget something? > > > Chris > > Le 1 déc. 2012 à 01:14, Kevin Downey <redc...@gmail.com> a écrit : > > here is an example https://gist.github.com/4179694 > > > On Fri, Nov 30, 2012 at 4:13 PM, Kevin Downey <redc...@gmail.com> wrote: > >> javafx.application.Application/launch is looking at the class that the >> method that calls it belongs to, in this case it belongs to the IFn class >> generated for the -main function, there is an arity for launch that takes >> the class you want to use instead of the weird detection thing >> >> >> >> >> >> On Fri, Nov 30, 2012 at 3:38 PM, Christian Sperandio < >> christian.speran...@gmail.com> wrote: >> >>> Hi, >>> >>> I'm testing JavaFX with Clojure 1.4 and I've got some issues. >>> I wrote this code: >>> (ns test-javafx2-clj.core >>> (:import javafx.application.Application >>> javafx.stage.Stage >>> (javafx.scene Parent Scene)) >>> >>> (:gen-class >>> :extends javafx.application.Application)) >>> >>> (defn -main >>> "I don't do a whole lot ... yet." >>> [& args] >>> (println "Before the launch call") >>> (javafx.application.Application/launch args)) >>> >>> (defn -start >>> [this stage] >>> (println "Arf!")) >>> ;(.setTitle stage "Hello World!")) >>> >>> My project.clj is the following: >>> (ns test-javafx2-clj.core >>> (:import javafx.application.Application >>> javafx.stage.Stage >>> (javafx.scene Parent Scene)) >>> >>> (:gen-class >>> :extends javafx.application.Application)) >>> >>> (defn -main >>> "I don't do a whole lot ... yet." >>> [& args] >>> (println "Before the launch call") >>> (javafx.application.Application/launch args)) >>> >>> (defn -start >>> [this stage] >>> (println "Arf!")) >>> ;(.setTitle stage "Hello World!")) >>> >>> >>> I build my jar with the command lein uberjar, and when I launch the >>> generated jar I get this error: >>> Exception in thread "main" java.lang.RuntimeException: Error: class >>> test_javafx2_clj.core$_main is not a subclass of >>> javafx.application.Application >>> at javafx.application.Application.launch(Application.java:211) >>> at test_javafx2_clj.core$_main.doInvoke(core.clj:14) >>> at clojure.lang.RestFn.invoke(RestFn.java:397) >>> at clojure.lang.AFn.applyToHelper(AFn.java:159) >>> at clojure.lang.RestFn.applyTo(RestFn.java:132) >>> at test_javafx2_clj.core.main(Unknown Source) >>> >>> It's very strange because I well wrote the >>> :extends javafx.application.Application. So, I don't understand why I've >>> got this error. >>> >>> Thanks for your help. >>> >>> Chris >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to clojure@googlegroups.com >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> clojure+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/clojure?hl=en >> >> >> >> >> -- >> And what is good, Phaedrus, >> And what is not good— >> Need we ask anyone to tell us these things? >> > > > > -- > And what is good, Phaedrus, > And what is not good— > Need we ask anyone to tell us these things? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en