From martin.desruisseaux at geomatys.com Tue Oct 1 08:37:39 2024 From: martin.desruisseaux at geomatys.com (Martin Desruisseaux) Date: Tue, 1 Oct 2024 10:37:39 +0200 Subject: AWT is somewhat dead, will JavaFX survive? In-Reply-To: References: <5ff460d4-9302-465d-9bcc-0c7315cc202d@dpsoftware.org> Message-ID: Le 2024-10-01 ? 00 h 33, Kevin Rushforth a ?crit : > And yes, we know that that there are missing features in JavaFX > relative to Swing like desktop integration and Image I/O to name two > important ones. I guess the question for you and other app developers > are: which ones are the most important that there be a native JavaFX > solution for? Just for information (not really expecting this work in JavaFX, since it may be a major effort), one feature is the `java.awt.image` package (I don't know if this is considered included in Image I/O), in particular its capacity to handle Terabytes of Earth Observation raster data. This package was the foundation of Java Advanced Imaging (JAI), designed 25 years ago by Sun Microsystem and Kodak with contributions of peoples from NASA and medical imagery. While JAI is not maintained anymore, we can still develop our own JAI-like framework on top of `java.awt.image`. Despite its age, that package is still amazingly powerful, even compared with modern competitors. However, `java.awt.image` is complex. Having 25 years of experience in using extensively that package (and contributed a few OpenJDK patches), I think I see how it could be simplified and better integrated with `java.nio.Buffer` (for example) without losing its power. The `java.awt.image` package may contain features that seem obsolete today, such as MultiPixelPackedSampleModel, but those features are important when the images are Gigabytes in size. However, it would be possible for a new image framework to keep those features without "polluting" the public API with those specialized classes. If an OpenJDK or OpenJFX effort was initiated for designing a successor of `java.awt.image` with the goal of being about as powerful, I would be glad to participate as a volunteer if accepted. ??? Martin From philip.race at oracle.com Tue Oct 1 16:20:47 2024 From: philip.race at oracle.com (Philip Race) Date: Tue, 1 Oct 2024 09:20:47 -0700 Subject: AWT is somewhat dead, will JavaFX survive? In-Reply-To: References: <5ff460d4-9302-465d-9bcc-0c7315cc202d@dpsoftware.org> Message-ID: We recognise this as a "gap". Definitely a lot of work to fill it. There's also degrees of what people need. Casual photo editing vs telescopic data or medical imaging etc. When you get to the data sizes you are talking about, which may require image tiling even today, and the kinds of image filters and processing being? applied, it is maybe more a 'server' application as a 'client' one. So I think we would want headless FX too. -phil. On 10/1/24 1:37 AM, Martin Desruisseaux wrote: > Le 2024-10-01 ? 00 h 33, Kevin Rushforth a ?crit : > >> And yes, we know that that there are missing features in JavaFX >> relative to Swing like desktop integration and Image I/O to name two >> important ones. I guess the question for you and other app developers >> are: which ones are the most important that there be a native JavaFX >> solution for? > > Just for information (not really expecting this work in JavaFX, since > it may be a major effort), one feature is the `java.awt.image` package > (I don't know if this is considered included in Image I/O), in > particular its capacity to handle Terabytes of Earth Observation > raster data. This package was the foundation of Java Advanced Imaging > (JAI), designed 25 years ago by Sun Microsystem and Kodak with > contributions of peoples from NASA and medical imagery. While JAI is > not maintained anymore, we can still develop our own JAI-like > framework on top of `java.awt.image`. Despite its age, that package is > still amazingly powerful, even compared with modern competitors. > > However, `java.awt.image` is complex. Having 25 years of experience in > using extensively that package (and contributed a few OpenJDK > patches), I think I see how it could be simplified and better > integrated with `java.nio.Buffer` (for example) without losing its > power. The `java.awt.image` package may contain features that seem > obsolete today, such as MultiPixelPackedSampleModel, but those > features are important when the images are Gigabytes in size. However, > it would be possible for a new image framework to keep those features > without "polluting" the public API with those specialized classes. > > If an OpenJDK or OpenJFX effort was initiated for designing a > successor of `java.awt.image` with the goal of being about as > powerful, I would be glad to participate as a volunteer if accepted. > > ??? Martin > > From martin.desruisseaux at geomatys.com Tue Oct 1 16:28:46 2024 From: martin.desruisseaux at geomatys.com (Martin Desruisseaux) Date: Tue, 1 Oct 2024 18:28:46 +0200 Subject: AWT is somewhat dead, will JavaFX survive? In-Reply-To: References: <5ff460d4-9302-465d-9bcc-0c7315cc202d@dpsoftware.org> Message-ID: Le 2024-10-01 ? 18 h 20, Philip Race a ?crit?: > When you get to the data sizes you are talking about, which may > require image tiling even today, and the kinds of image filters and > processing being? applied, it is maybe more a 'server' application as > a 'client' one. So I think we would want headless FX too. Indeed, image tiling is critical, which java.awt.image.RenderedImage supports well and is one of the important features to keep that I had in mind. But it is true that if done in JavaFX, it would require an headless FX (for something equivalent to java.awt.Graphics2D too). ??? Martin From perini.davide at dpsoftware.org Wed Oct 2 12:47:24 2024 From: perini.davide at dpsoftware.org (Davide Perini) Date: Wed, 2 Oct 2024 14:47:24 +0200 Subject: AWT is somewhat dead, will JavaFX survive? In-Reply-To: <5c2d835a-d6c7-4a67-9bc0-efb13e37fb88@oracle.com> References: <5ff460d4-9302-465d-9bcc-0c7315cc202d@dpsoftware.org> <5c2d835a-d6c7-4a67-9bc0-efb13e37fb88@oracle.com> Message-ID: <25cbf382-99e3-431c-9e5f-364d93332b59@dpsoftware.org> Hi Kevin, I'm the submitter of the following bug reports: https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8341144 https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8310352 https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8323821 https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8341173 https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8323977 These issues arose during the development of a toy application. Specifically, regarding the tray icon functionality, GNOME can't fix issues that require changes to the underlying AWT libraries. Linux has switched its focus to SNI and many distributions are dropping support for legacy xembed protocols. As previously mentioned, while JavaFX is a powerful framework, it still relies on Swing/AWT for certain functionalities to create full-fledged desktop applications. However, the development of Swing/AWT seems to have stagnated. If the plan is not to invest further in Swing/AWT development, then perhaps a clearer communication strategy is needed. It would be beneficial for developers to know if Swing/AWT is no longer the recommended path for desktop applications, and if so, what alternative approaches are suggested. Furthermore, AWT is still relying on outdated Windows 98 APIs for notifications. This approach is problematic considering the recent changes introduced in Windows 11 that have broken OS notifications within Java applications. Notifications are a crucial aspect of many applications, and even web apps are increasingly leveraging native OS notifications for a better user experience. The core issue here isn't with JavaFX itself; rather, it's the fact that JavaFX alone isn't sufficient to develop full-fledged apps that need to interact with the operating system for functionalities like tray icons and notifications. I am a big fan of JavaFX. It's a user-friendly and productive framework for UI development. However, my experience highlights the limitations of using JavaFX for applications requiring deeper interaction with the underlying operating system. Is there any movement to address these shortcomings? Could JavaFX potentially take over the responsibilities of AWT and Swing, providing a more unified and up-to-date API for these features? Additionally, are there plans to update AWT and Swing to replace outdated APIs that are over 25 years old? Kind regards, Davide On 01/10/2024 01:24, Philip Race wrote: > > > On 9/30/24 3:33 PM, Kevin Rushforth wrote: >> Swing / AWT is still being actively maintained and isn't "abandoned". >> What you are describing are bugs. Have you filed them? > > Perhaps Davide is the submitter for this TrayIcon bug submitted 2 days ago > https://bugs.openjdk.org/browse/JDK-8341144 > > FWIW TrayIcon recently suffered from a regression bug in the Linux desktop > Gnome have now fixed it so it should be OK if you are on the latest > distros. > https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/2127c62b210f605747e019e6e2abee82516e3ccb/NEWS#L152 > Corresponding JDK bug : https://bugs.openjdk.org/browse/JDK-8322750 > > And we've done loads of updates for new OSes to keep things current > and working. > Right now we are just wrapping up a JCP maintenance release (a > significant investment) and the > backports of everything needed to be able to support Wayland on Linux. > That's not abandoned by any reasonable criteria. > > -phil. > > >> >> And yes, we know that that there are missing features in JavaFX >> relative to Swing like desktop integration and Image I/O to name two >> important ones. I guess the question for you and other app developers >> are: which ones are the most important that there be a native JavaFX >> solution for? >> >> -- Kevin >> >> >> On 9/30/2024 2:17 PM, Davide Perini wrote: >>> Hi, >>> thanks for your time, I appreciate the answer. >>> >>> I love JavaFX and my concern is sincere. >>> JavaFX is not a "complete solution" to build UIs because it relies >>> on AWT for basic and important features like a TrayIcon for example. >>> >>> AWT is abandoned, most of its APIs is falling apart causing issues >>> on modern OS. >>> >>> That's why of my question. If AWT is abandoned, how can JavaFX >>> survive this? >>> Does it has sense in developing JavaFX if Oracle abandoned AWT? >>> >>> I know that JavaFX devs thinks that AWT and JavaFX are two separate >>> things but for devs that must develop a software that has a UI, >>> JavaFX is not enough because JavaFX has "nearly no integration with >>> the OS". >>> >>> I mean, how can we convince new developers to jump on JavaFX if the >>> "surroundings" are in this state? >>> >>> Davide >>> >>> >>> >>> On 28/09/2024 20:37, Johan Vos wrote: >>>> I got the?question "Will JavaFX survive?" very often since I became >>>> co-lead of the OpenJFX project, about 7 years ago. OpenJFX is a >>>> technology project and contrary to most client frameworks OpenJFX >>>> itself has no marketing department with "devrels" etc. >>>> The resources working on OpenJFX are focusing on the technology. >>>> And I am very proud to see that the code you could write for JavaFX >>>> 9 is still running today on JavaFX 23. I don't think many client >>>> technologies can say the same. >>>> The diverse contributors to the OpenJFX?project are doing a >>>> fantastic job in maintaining and advancing the technology in the >>>> spirit of OpenJDK and Java in general. Granted, I sometimes wish we >>>> (as in OpenJFX) had some marketing efforts of paid devrels?to >>>> spread the word at many conferences. But as developers, our first >>>> priority and main skills are in working on the code. >>>> >>>> - Johan >>>> >>>> On Sat, Sep 28, 2024 at 5:17?PM Davide Perini >>>> wrote: >>>> >>>> no answers, means a lot... >>>> >>>> On 26/09/2024 17:44, Davide Perini wrote: >>>> > As title. >>>> > AWT is too old to withstand the future and probably it's too >>>> old to >>>> > withstand the present. >>>> > >>>> > AWT is falling apart with old APIs breaking as operating >>>> systems move on. >>>> > >>>> > Even very important features like tray icons and >>>> notifications are >>>> > broken. >>>> > Something is broken in Windows, something in Linux, something >>>> on macOS. >>>> > >>>> > Current notification APIs is old and is somewhat broken in >>>> Windows >>>> > with notification that doesn't stick in the notification center. >>>> > >>>> > SystemTray on Linux is completely broken because it still >>>> uses the >>>> > ancient xembeds instead of the newer SNI. >>>> > >>>> > I love JavaFX but will JavaFX survive the fact that AWS is >>>> abandoned >>>> > and that it is falling apart? >>>> > >>>> > Is there something moving to renew AWT or it's just kicking a >>>> dead horse? >>>> > >>>> > Thanks >>>> > Davide >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: