Clojure, Lein, JavaFx, native deps

Context

I want to use JavaFx with clojure.

I know http://nailthatbug.net/2011/06/clojure-javafx-2-0-simple-app/

Question:

Is there a way to get JavaFX to work with Clojure using native-deps in lein instead?

Thank!

+1
source share
4 answers

Since JavaFx has its own dependencies, your option is limited,]

  • sending these dependencies with your project (including them),
  • creating a package on which you can depend on which one it is on (providing them),
  • or your package requires the user to install them in some other way.

, , , / JavaFx, robert.hook , . , / .

native-deps . .so,.dll,.etc . , github- , , .

+1

Clojure JavaFX Github. Ubuntu JavaFX Maven, deploy: deploy-file (install: install-file ).

mvn deploy:deploy-file -DgroupId=local.oracle -DartifactId=javafxrt -Dversion=2.2.0 -Dpackaging=jar -Dfile=/usr/lib/jvm/java-7-oracle-amd64/jre/lib/jfxrt.jar -Durl=file:/home/raju/.m2/repository

, :

  • -Dfile = { jfxrt.jar jre/lib}
  • -Durl = file: { Maven, . $HOME/m2.repository}

project.clj , -DgroupId -DartifactId, JAR . , :

[local.oracle/javafxrt "2.2.0"]

Java - . Java ,

: java.lang.UnsatisfiedLinkError: : /usr/lib/jvm/javafx -sdk/rt/lib/amd64/libglass.so

SO:

LD_LIBRARY_PATH ?
java.lang.UnsatisfiedLinkError no *****. dll java.library.path

+3

, , Java 8 JavaFX JDK/JRE. , .

+1

, , :

mvn install: install-file -DgroupId = javafx -DartifactId = javafx -Dversion = 2.1.0 -Dpackaging = jar -Dfile =/Library/Java/JavaVirtualMachines/1.7.0.jdk///jre/lib/jfxrt.jar

, , , jfxrt.jar . , , project.clj

[javafx "2.1.0"]

(: native-deps).

[Having written this, I really don't know why this even seems to work.]

0
source

All Articles