Code Monkey home page Code Monkey logo

Comments (11)

giltene avatar giltene commented on August 27, 2024 5

The main driver for us building and providing FX-bundled versions of Zulu JDKs was making sure things work well in transitioning from Oracle JDK 8 to OpenJDK 8. Since Oracle JDK 8 had JavaFX bundled, none of the gradle/maven tooling stuff (as much as I personally use them. recommend them, and am happy/thankful for the community effort put into them) provides a "drop in", zero changes means for replacing the Oracle JDK. Bundling is there becuase many people's existing code and workflows assume FX-bundling.

Ironically, one of the most common drivers for people looking for a JavaFX-bundled JDK is not actual JavaFX application use, but "accidental"/unintentional use of some useful classes that happened to be part of JavaFX, but not part of the JDK, and were historically bundled in Oracle JDK 8.

E.g. one of the most popular transitioning problem we've run into with plain OpenJDK 8 JDK is that is that OpenJDK 8 is "missing" javafx.util.Pair<K,V>. And yes, it's just a Pair class, and there are 342 other places you can get a good Pair class from. But that pair class was "part" of Oracle JDK 8, and it just worked there, and it is already in many people's code, so...

This then continues with OpenJDK 11, where people transitioning existing code from 8 to 11 run into these "missing" FX classes (on top of all their other post-Java-8 trasitioning pain). We've run into enough of that in the real world that we chose to regularly provide FX-bundled OpenJDK 11 with Zulu starting with 11.0.3.

from setup-java.

konradpabjan avatar konradpabjan commented on August 27, 2024 3

Support for JavaFX has been added with #27 being merged in. Big thanks to @giltene ! 🎉

README.md has been updated to reflect the recent changes. As long as you're using actions/setup-java@v1 then you should be able to use the most recent changes

from setup-java.

airsquared avatar airsquared commented on August 27, 2024

@damccorm Would this be possible?

from setup-java.

damccorm avatar damccorm commented on August 27, 2024

I think I'm going to defer to @stephenmichaelf on this one. I could really go either way on whether or not this belongs in this action or a separate setup action (e.g. setup-javafx).

It feels kinda similar to actions/setup-ruby#20, but its not quite the same in that JavaFX is a superset of Java and not just a straight up implementation (like in the Ruby example). If we decide to do this, we should align syntax across both actions though.

from setup-java.

airsquared avatar airsquared commented on August 27, 2024

I don't think there should a separate action for this, as it's just a regular JDK that also includes JavaFX.

I think to add this feature, if the user wants the JavaFX version this line:

let versions = ref.match(/jdk.*-/gi) || [];

would be changed to let versions = ref.match(/ca-fx-jdk.*-/gi) || [];.

from setup-java.

airsquared avatar airsquared commented on August 27, 2024

@damccorm, @stephenmichaelf I created a PR: #19.

from setup-java.

Siedlerchr avatar Siedlerchr commented on August 27, 2024

Alternatively one could use the Liberica JDK which already inlcudes javafx:
https://bell-sw.com/pages/java-11.0.4/

from setup-java.

giltene avatar giltene commented on August 27, 2024

Zulu Community has been making fx-bundled variants (...fx-jdkX.Y.Z... vs. ...jdkX.Y.Z...) available starting with 8 and 11 versions 8u202 and 11.0.3, and will continue to provide fx variants for all future updates of those LTS versions. So I can confirm that the parsing suggested in the referenced pull request will continue to work reliably.

from setup-java.

msgilligan avatar msgilligan commented on August 27, 2024

And, of course, you can now download JavaFX via maven/gradle since it has been decoupled from the JDK. That's how I've been happily doing it recently.

See:

from setup-java.

msgilligan avatar msgilligan commented on August 27, 2024

Thanks @giltene for the detailed explanation. Totally makes sense.

from setup-java.

giltene avatar giltene commented on August 27, 2024

I've created a separate pull request #27 that covers the requested feature but with a different syntax than the one proposed here: The change introduces a new java-package option that supports jre, jdk, and jdk+fx as accepted values (defaults to jdk and retains current behavior unless jre or jdk+fx is specified). I believe that this syntax (a single option to cover current and possible future package types) is preferable to having individual booleans per package type.

The action is available for testing as foo-actions/setup-java@master

from setup-java.

Related Issues (20)

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.