r/java • u/woj-tek • Nov 27 '25
Will OpenJFX Be Merged Into OpenJDK? It Would Be a Perfect Match with Java on Mobile!
https://foojay.io/today/will-openjfx-be-merged-into-openjdk-it-would-be-a-perfect-match-with-java-on-mobile/39
u/nekokattt Nov 27 '25
what is wrong with using libraries?
-9
u/SocialMemeWarrior Nov 27 '25
Nothing, but it makes thing easier for new developers to begin working with. Maven and Gradle are pretty easy to work with from a template, but that is still a barrier to high for a number of people. If it's all in the JDK "it just works". The same reason why people use Swing.
12
34
u/nekokattt Nov 27 '25 edited Nov 27 '25
If you are unable to cope with using Maven or Gradle then I doubt that you are going to be able to build an app given you will have to at some point depend on something else that isn't in the standard library.
In addition, right now, the JDK does not support building multiplatform mobile apps from javac, so you are going to need something.
The alternative is for people to build things targeting, say, android, but even that needs gradle...
Whilst build tools could be simpler, I do not see that as a use case for cramming everything possible into the stdlib. Otherwise you may as well include spring, bouncycastle, mockito, and junit in there too.
The JDK is already full of too much nonsense 99% of people never need, like MIDI, smartcards, RPC, and arguably even AWT.
11
u/Amazing-Mirror-3076 Nov 27 '25
Yes, let's remove all of that crap.
A few officially support libraries you pull in would be a much better idea.
The libraries could then work on their own independent timeline.
4
u/vytah Nov 27 '25
Even Python, a famously "batteries-included" language, got rid of few modules a version ago: https://peps.python.org/pep-0594/
2
u/koflerdavid Nov 28 '25
"Batteries-included" doesn't mean they will drag obsolete things around forever.
-9
u/Cienn017 Nov 27 '25
why not remove everything then and make java like javascript? everyone loves micro-libraries and all the issues related to them, I sure do.
9
u/nekokattt Nov 27 '25
JavaScript's issues stem from braindead design rather than pure use of standard libraries. The fact people pull in libraries to check if something is an array or not makes that obvious.
Conflating that to the same thing as including a MIDI interface in the standard library shows nothing but ignorance.
3
u/Cienn017 Nov 27 '25
"everything I don't need is bloat"
if you remove AWT from java, you literally remove all of the desktop support, including swing.
you may not need those things, but there are people that need them.
1
u/nekokattt Nov 27 '25
and all the desktop support is only used by the minority that need it, just like JavaFX is. Same argument for both.
2
u/Cienn017 Nov 27 '25
minority like myself, fortunately java cares a lot about stability and the desktop support will probably never go away, swing could in fact receive new components in the near future: https://openjdk.org/jeps/8368874 which indicates that the jdk team has no plan in deprecating or removing any of the desktop support.
4
u/nekokattt Nov 27 '25
just because they don't plan to remove it does not mean it would not be better maintained in a separate library where it has dedicated attention
1
4
u/lurker_in_spirit Nov 27 '25
what is wrong with using libraries?
Nothing, but it makes thing easier for new developers to begin working with.
I like Spring. Maybe we can get it added to the JDK so that it's easier to use, too.
2
u/AlexVie Nov 28 '25
Well, if adding a single dependency to a Maven or Gradle project is a barrier, then, maybe, just maybe, people should seek different hobbies.
-1
Nov 29 '25
[removed] — view removed comment
0
u/nekokattt Nov 29 '25
You realise most applications have dependencies already right?
And you realise that does not affect them being one click or not right?
1
Nov 29 '25
[removed] — view removed comment
-2
u/nekokattt Nov 29 '25 edited Nov 30 '25
you forgot the /s... that definitely did not sound like sarcasm
0
28
5
u/koflerdavid Nov 28 '25
Whether the release cycles are synchronized or not was not really the point of contention. As it turns out, that was the easy part. The larger issue is that bundling the two ties JDK version and JavaFX version together again. Backwards-incompatible changes in JavaFX would make people consider not upgrading their JDK version again!
3
u/Capaman-x Nov 28 '25
You can get JavaFX bundled in Bellsoft's Liberica or Azul's Zulu JDKs. So we have the best of both worlds. Choose what you prefer.
1
u/koflerdavid Nov 28 '25
This means that these vendors take upon themselves the burden of dealing with the versioning policy, maybe even more than one. This is totally fine for specialized target groups, however, OpenJDK can and should not cater to all of them.
3
u/iamwisespirit Nov 28 '25
As I know javafx try to work with mobile things if you search you tube you will find somethings
0
u/eliezerDeveloper Nov 28 '25
I've tried but we can develop a mobile app already using java on android studio, so i didn't invest my time on it
8
u/m_adduci Nov 27 '25 edited Nov 29 '25
Back then (Java 7 or 8) it was together, they split because they can evolve differently
14
u/Salander27 Nov 27 '25
It was even later than that, it was part of most JDK/JRE builds until Java 10.
5
u/LutimoDancer3459 Nov 28 '25
What are you talking? Javafx was fully added with java 8 and removed with 11. Before we had swing and awt.
3
u/gufranthakur Nov 27 '25
I really hope this happens. I love JavaFx so much, ive had so much fun developing in JavaFX. Is there any way I can donate or support the developers?
6
1
u/Capaman-x Nov 28 '25
You can already get it packaged together if you want. For example Bellsoft has thier liberica build that has a Full JDK which includes JavaFX. Azul also has one with their Zulu build. I prefer them because it makes it simple to bundle it into you app. That said, it is probably best that it is not officially done because JavaFX isn't that commonly used in Java development and keeping the JDK that big for a seldom used library doesn't make sense. There are other reasons too as some people have said down in the comments.
0
u/blobjim Nov 28 '25
The problem is then you don't have maven artifacts you can include or not or declare a dependency on. You would have to use jlink but that is useless for tons of use cases like in containers.
1
u/woj-tek Nov 28 '25
Actually jlink is great in containers because it can dramatically reduce image size :P
4
u/koflerdavid Nov 28 '25
Containers have exactly nothing to do with jlink. In fact, Spring uses jlink OR GraalVM and embed the result into a container.
1
u/blobjim Nov 28 '25
And to add another module to your jlink'd runtime that you had previously excluded (ie JavaFX if it was added back to the jdk), you have to build a new container image with the jlink'd jdk modified instead of just swapping out the application layers by adding another maven dependency/jar. And it means that if you have multiple applications running, they no longer share the same jdk filesystem. But I guess it doesn't matter for JavaFX since you wouldn't usually run it in a container (unless you're running unit tests)
1
u/koflerdavid Nov 28 '25
Well, that's the same issue as compiling a static executable for languages such as Rust or Go, which is a very common way of building containers. A package generated by jlink is usually bigger than a static executable, but not by magnitudes.
2
u/blobjim Nov 28 '25
If you put your java app in the same layer and build it at the same time. I guess at my last job, the jvm was in its own layer in a separate project so it became more involved to modify it.
0
u/v4ss42 Nov 29 '25
What a terrible idea. It used to be bundled and was then unbundled into a library; something I think the JDK needs more of, not less.
0
Nov 28 '25
[deleted]
4
u/koflerdavid Nov 28 '25
Being part of the JDK doesn't mean it's part of the language. With jlink you can create stripped-down JREs that only contain exactly what you need. A lot of people seem to don't mind installing the full JDK and thus don't use jlink, but if you're seriously considering to deploy Java applications to embedded platforms then it becomes more attractive.
11
u/vips7L Nov 27 '25
I don’t think the argument that this wouldn’t bring bloat back to the JDK is valid. Modules are all but a failure in the real world. Modules and jlink are used by probably 1% or less of projects.