Originally posted by Leprechaunius
View Post
Announcement
Collapse
No announcement yet.
Java 17 / OpenJDK 17 Hits GA With Maturing Vector API, Removal Planned For Applet API
Collapse
X
-
-
Originally posted by mdedetrich View PostYup, or basically sealed in scala (i.e. sealed abstract class or sealed trait) so you can get proper exhaustive checking in pattern matching
Leave a comment:
-
Originally posted by krzyzowiec View Post
I think he may be confusing the fact that it has a webview component with that being the basis of the toolkit, which it is not.
The point is jfx is like a web browser - you can even use CSS to style the UI components. Plus yes, it has the embedded WebView component so you can just embed a full Webkit, display a webpage and interact via JS. JFX is much more easier to port due to simpler architecture. Let me just quote Oracle, as they summed it up nicely in the docs:
"The Glass toolkit is also responsible for managing the event queue. Unlike the Abstract Window Toolkit (AWT), which manages its own event queue, the Glass toolkit uses the native operating system's event queue functionality to schedule thread usage. Also unlike AWT, the Glass toolkit runs on the same thread as the JavaFX application. In AWT, the native half of AWT runs on one thread and the Java level runs on another thread. This introduces a lot of issues, many of which are resolved in JavaFX by using the single JavaFX application thread approach."
Btw also part of this discussion - all of the java UI toolkits use GTK3 as a native backend in linux. This was always the case, although previously we had just GTK2 support and then it became a fallback path. https://openjdk.java.net/jeps/283
gstreamer is also used for media playback if anyone is wondering.
Leave a comment:
-
Originally posted by krzyzowiec View Post
I think he may be confusing the fact that it has a webview component with that being the basis of the toolkit, which it is not.
Leave a comment:
-
Originally posted by mazumoto View Post
Are you sure JavaFX (2+) has anything to do with Webkit or even a Browser? I don't think Webkit is written in Java nor that it'd fit in those few small Jars you as dependencies to use it ...
Leave a comment:
-
Originally posted by Leprechaunius View PostThe idea is to first try to migrate the JavaFX toolkit as that is basically just an embedded web browser / webkit in a window, so probably less effort.
Leave a comment:
-
Originally posted by GreenToad View Post
Actually that's not it, java always had "final" classes that are exactly what c# calls "sealed" classes. What Java calls "sealed" classes c# will be getting as "closed" types
https://github.com/dotnet/csharplang/issues/485
Leave a comment:
-
There's some misinformation in this thread. Let me make this right from a position of a long time Java dev.
First of all - no, java does not support wayland yet. There was a very recent push on this front by the people from Jetbrains, because they really need it for their IDEs. There's a thread on the mailing list, (google for it, I'm on my vacation with no computer in sight, typing on a phone). The idea is to first try to migrate the JavaFX toolkit as that is basically just an embedded web browser / webkit in a window, so probably less effort. Swing is entirely different beast and will come probably later. Btw Swing is actually based on AWT under the hood, so no point in trying to distinguish them here.
The main concern in porting jfx is caused by so called Robot classes that provide utilities to simulate input and interaction to facilitate automated testing and whatnot. This as was said is not so straightforward to make "WORE".
Second - sealed classes are in no way about making them "final", java had that for years. The usefulness of this feature is still debated by top architects, but the idea is if you're writing a framework, you can mark some of the classes as sealed to prevent downstream of extending them by subclassing, while allowing you to fully use inheritance in your code. This gives you much more fine grained control over who can extend your code and how.
And third - on the topic of adoption. In my company we currently use jdk 16 and will probably migrate to 17 before the end of the year. Some projects of my friends and previous colleagues (especially government sector) are still stuck with jdk8, - that we always knew would be the case. That's how Oracle gets their money. Extended support licenses and so on... Most of the projects (even the fintech sector) are steadily using jdk11. With 17, being another LTS release, will probably get similar adoption rate.Last edited by Leprechaunius; 15 September 2021, 03:29 PM.
Leave a comment:
-
Originally posted by jacob View Post
I could be mistaken but I believe that AWT was based on Motif and Swing is more or less raw Xlib so yeah, no chance of ever moving to Wayland.
Leave a comment:
Leave a comment: