Code Monkey home page Code Monkey logo

Comments (6)

headcr4sh avatar headcr4sh commented on June 12, 2024

The latest sources use a rather tricky mechanism to put jfxrt.jar onto the classpath of the java compiler. Even though, JDK1.7.0_45 comes bundled with the JavaFX runtime, the JavaFX classes are not added to the compiler's default (or "boot") classpath.

There are 3 ways to work around this issue:

(1) Define a Maven dependency with scope=system and use the systemPath to make sure that the file jfxrt.jar can be found during compile time.
--> I used to do that, but found the solution not very elegant.

(2) Copy jfxrt.jar into your JRE's "lib/ext" folder. That way all Java processes (that also includes the javac compiler) will be able to pick it up.
--> Not very elegant either because it means that you'll have to modify the installation folder of your JDK and for some people that don't have admin privileges it is simply not an option.

(3) Pimp the configuration of the maven-compiler-plugin to make sure that the "bootclasspath" of the compiler is enhanced (if necessary).
When using Java 8 this is no longer necessary as the bootclasspath of javac already contains the JavaFX runtime.
Therefore it is also necessary to encapsulate the configuration above into it's own Maven profile.
--> I modified the build process of fx-guice to work like that some time ago. Check out the latest sources of the parent POM's project (http://github.com/cathive/oss-parent) to see how that works.

So... I don't intend to remove the jfx dependency from maven, unless you can provide some more insights to clarify your point and prove me wrong in my assumptions about how the classpath and lookup mechanism of the Java compiler work. ;-)

If you are having trouble with your IDE and simply want to disable the classpath extension mechanism you can disable the "jdk7" profile when invoking Maven, e.g.: "mvn -P-jdk7 [...]" or just 'uncheck' the profile (e.g. when using m2eclipse).

from fx-guice.

headcr4sh avatar headcr4sh commented on June 12, 2024

Mh... just realized that I did NOT release the changes mentioned in my previous comment.
Prepare for a fx-guice release 2.1.3 then!!! ;-)

from fx-guice.

headcr4sh avatar headcr4sh commented on June 12, 2024

Hopefully I'll find the time to perform an upload onto Nexus tomorrow...

from fx-guice.

sialcasa avatar sialcasa commented on June 12, 2024

Thanks :-)

from fx-guice.

sialcasa avatar sialcasa commented on June 12, 2024

Close it, if you deployed the version. Thanks 👍

from fx-guice.

headcr4sh avatar headcr4sh commented on June 12, 2024

fx-guice 2.1.3 has just been released. ;-)

from fx-guice.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.