From johan.vos at gluonhq.com Tue May 28 12:15:16 2019 From: johan.vos at gluonhq.com (Johan Vos) Date: Tue, 28 May 2019 14:15:16 +0200 Subject: JavaFX with GraalVM Message-ID: Hi, We just posted a news entry announcing that we have a build tool that converts JavaFX applications into native executables using GraalVM: https://gluonhq.com/a-boost-for-java-on-the-client/ The JavaFX code used for this comes from my fork at https://github.com/johanvos/openjdk-jfx/tree/omega which has only 1 commit that is not upstream (yet), and that allows to build static libraries from the JavaFX code (instead of dynamic libraries). The source for the native parts of the Java core classes that are linked into this release come from OpenJDK, where we built native libraries as well (instead of dynamic libraries). At this moment, we only do this for Mac, but Linux is almost ready too, and other platforms will follow. - Johan From david.goodenough at linkchoose.co.uk Tue May 28 14:29:59 2019 From: david.goodenough at linkchoose.co.uk (David Goodenough) Date: Tue, 28 May 2019 15:29:59 +0100 Subject: JavaFX with GraalVM In-Reply-To: References: Message-ID: <1698352.t9Ea9tEfyj@continuum> Does the AOT compiler use LLVM? If so I wonder if it could be connected with Scala-native (which also uses LLVM to produce binaries). In particular I would be interested in having JavaFX (with the ScalaFX wrapper) as a linkage library. David On Tuesday, 28 May 2019 13:15:16 BST Johan Vos wrote: > Hi, > > We just posted a news entry announcing that we have a build tool that > converts JavaFX applications into native executables using GraalVM: > https://gluonhq.com/a-boost-for-java-on-the-client/ > > The JavaFX code used for this comes from my fork at > https://github.com/johanvos/openjdk-jfx/tree/omega which has only 1 commit > that is not upstream (yet), and that allows to build static libraries from > the JavaFX code (instead of dynamic libraries). > > The source for the native parts of the Java core classes that are linked > into this release come from OpenJDK, where we built native libraries as > well (instead of dynamic libraries). > > At this moment, we only do this for Mac, but Linux is almost ready too, and > other platforms will follow. > > - Johan From mp at jugs.org Tue May 28 14:42:34 2019 From: mp at jugs.org (Michael Paus) Date: Tue, 28 May 2019 16:42:34 +0200 Subject: JavaFX with GraalVM In-Reply-To: References: Message-ID: <6add51c5-af0a-3bd5-42ea-c3d47387d79a@jugs.org> This is really great news. I am excited to see how this goes on. I have one question though: Is it really necessary to build on a JDK 11 distribution or is it also ok to use JDK 12 and only set Source/Target to 11? - Michael Am 28.05.19 um 14:15 schrieb Johan Vos: > Hi, > > We just posted a news entry announcing that we have a build tool that > converts JavaFX applications into native executables using GraalVM: > https://gluonhq.com/a-boost-for-java-on-the-client/ > > The JavaFX code used for this comes from my fork at > https://github.com/johanvos/openjdk-jfx/tree/omega which has only 1 commit > that is not upstream (yet), and that allows to build static libraries from > the JavaFX code (instead of dynamic libraries). > > The source for the native parts of the Java core classes that are linked > into this release come from OpenJDK, where we built native libraries as > well (instead of dynamic libraries). > > At this moment, we only do this for Mac, but Linux is almost ready too, and > other platforms will follow. > > - Johan From johan.vos at gluonhq.com Tue May 28 15:15:23 2019 From: johan.vos at gluonhq.com (Johan Vos) Date: Tue, 28 May 2019 17:15:23 +0200 Subject: JavaFX with GraalVM In-Reply-To: <6add51c5-af0a-3bd5-42ea-c3d47387d79a@jugs.org> References: <6add51c5-af0a-3bd5-42ea-c3d47387d79a@jugs.org> Message-ID: That works (more or less). In general, the build JVM determines what Java bytecodes are used. The native libraries are pulled from static builds we generate. We're working on supporting a number of configurations. - Johan On Tue, May 28, 2019 at 4:53 PM Michael Paus wrote: > This is really great news. I am excited to see how this goes on. > I have one question though: Is it really necessary to build on a JDK 11 > distribution or is it also ok to use JDK 12 and only set Source/Target > to 11? > - Michael > > Am 28.05.19 um 14:15 schrieb Johan Vos: > > Hi, > > > > We just posted a news entry announcing that we have a build tool that > > converts JavaFX applications into native executables using GraalVM: > > https://gluonhq.com/a-boost-for-java-on-the-client/ > > > > The JavaFX code used for this comes from my fork at > > https://github.com/johanvos/openjdk-jfx/tree/omega which has only 1 > commit > > that is not upstream (yet), and that allows to build static libraries > from > > the JavaFX code (instead of dynamic libraries). > > > > The source for the native parts of the Java core classes that are linked > > into this release come from OpenJDK, where we built native libraries as > > well (instead of dynamic libraries). > > > > At this moment, we only do this for Mac, but Linux is almost ready too, > and > > other platforms will follow. > > > > - Johan > > > From pnem at cmail.cz Wed May 29 22:51:38 2019 From: pnem at cmail.cz (Petr Nemecek) Date: Thu, 30 May 2019 00:51:38 +0200 Subject: What to do with an JavaFX exception Message-ID: <004c01d51671$1351c860$39f55920$@cmail.cz> Dear all, when making a call in a separate thread like this: myTableView.getSelectionModel().select(myItem); I sometimes (not every time...) get the exception see the stacktrace below. It looks to me like a bug somewhere in JavaFX code. Could I file this as a bug? Where? Many thanks, Petr *** java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -1 is negative at java.base/java.lang.System.arraycopy(Native Method) at javafx.collections.transformation.SortedList.removeFromMapping(SortedList.java:364) at javafx.collections.transformation.SortedList.addRemove(SortedList.java:398) at javafx.collections.transformation.SortedList.sourceChanged(SortedList.java:108) at javafx.collections.transformation.TransformationList.lambda$getListener$0(TransformationList.java:106) at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88) at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164) at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73) at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233) at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482) at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541) at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205) at com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:157) at com.sun.javafx.scene.control.SelectedCellsMap.clear(SelectedCellsMap.java:202) at javafx.scene.control.TableView$TableViewArrayListSelectionModel.quietClearSelection(TableView.java:2815) at javafx.scene.control.TableView$TableViewArrayListSelectionModel.select(TableView.java:2539) at com.rinkai.rinkairouting.scenes.main.DistanceMatrixController$1.call(DistanceMatrixController.java:200) From tom.schindl at bestsolution.at Thu May 30 06:51:33 2019 From: tom.schindl at bestsolution.at (Tom Schindl) Date: Thu, 30 May 2019 08:51:33 +0200 Subject: What to do with an JavaFX exception In-Reply-To: <004c01d51671$1351c860$39f55920$@cmail.cz> References: <004c01d51671$1351c860$39f55920$@cmail.cz> Message-ID: You need to interface with FX on the JavaFX thread. Tom Von meinem iPhone gesendet > Am 30.05.2019 um 00:51 schrieb Petr Nemecek : > > Dear all, > > when making a call in a separate thread like this: > > myTableView.getSelectionModel().select(myItem); > > I sometimes (not every time...) get the exception see the stacktrace below. > > It looks to me like a bug somewhere in JavaFX code. Could I file this as a bug? Where? > > Many thanks, > Petr > > *** > java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -1 is negative > at java.base/java.lang.System.arraycopy(Native Method) > at javafx.collections.transformation.SortedList.removeFromMapping(SortedList.java:364) > at javafx.collections.transformation.SortedList.addRemove(SortedList.java:398) > at javafx.collections.transformation.SortedList.sourceChanged(SortedList.java:108) > at javafx.collections.transformation.TransformationList.lambda$getListener$0(TransformationList.java:106) > at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88) > at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164) > at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73) > at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233) > at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482) > at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541) > at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205) > at com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:157) > at com.sun.javafx.scene.control.SelectedCellsMap.clear(SelectedCellsMap.java:202) > at javafx.scene.control.TableView$TableViewArrayListSelectionModel.quietClearSelection(TableView.java:2815) > at javafx.scene.control.TableView$TableViewArrayListSelectionModel.select(TableView.java:2539) > at com.rinkai.rinkairouting.scenes.main.DistanceMatrixController$1.call(DistanceMatrixController.java:200) > > From anthonyv.be at outlook.com Thu May 30 06:55:28 2019 From: anthonyv.be at outlook.com (Anthony Vanelverdinghe) Date: Thu, 30 May 2019 06:55:28 +0000 Subject: What to do with an JavaFX exception In-Reply-To: References: <004c01d51671$1351c860$39f55920$@cmail.cz>, Message-ID: Hi Petr Tom is correct. In case you would find a bug in JavaFX, it should be filed at https://bugreport.java.com like any other Java bug. Kind regards Anthony ________________________________ From: openjfx-discuss on behalf of Tom Schindl Sent: Thursday, May 30, 2019 8:51:33 AM To: Petr Nemecek Cc: openjfx-discuss at openjdk.java.net Subject: Re: What to do with an JavaFX exception You need to interface with FX on the JavaFX thread. Tom Von meinem iPhone gesendet > Am 30.05.2019 um 00:51 schrieb Petr Nemecek : > > Dear all, > > when making a call in a separate thread like this: > > myTableView.getSelectionModel().select(myItem); > > I sometimes (not every time...) get the exception see the stacktrace below. > > It looks to me like a bug somewhere in JavaFX code. Could I file this as a bug? Where? > > Many thanks, > Petr > > *** > java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -1 is negative > at java.base/java.lang.System.arraycopy(Native Method) > at javafx.collections.transformation.SortedList.removeFromMapping(SortedList.java:364) > at javafx.collections.transformation.SortedList.addRemove(SortedList.java:398) > at javafx.collections.transformation.SortedList.sourceChanged(SortedList.java:108) > at javafx.collections.transformation.TransformationList.lambda$getListener$0(TransformationList.java:106) > at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88) > at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164) > at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73) > at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233) > at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482) > at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541) > at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205) > at com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:157) > at com.sun.javafx.scene.control.SelectedCellsMap.clear(SelectedCellsMap.java:202) > at javafx.scene.control.TableView$TableViewArrayListSelectionModel.quietClearSelection(TableView.java:2815) > at javafx.scene.control.TableView$TableViewArrayListSelectionModel.select(TableView.java:2539) > at com.rinkai.rinkairouting.scenes.main.DistanceMatrixController$1.call(DistanceMatrixController.java:200) > > From jonathan.marchand68 at gmail.com Mon May 20 08:17:43 2019 From: jonathan.marchand68 at gmail.com (Jonathan Marchand) Date: Mon, 20 May 2019 10:17:43 +0200 Subject: Focus events in JavaFX Message-ID: Hello, When the main frame of my application gains focus, I would like to be able to know where it came from. This is because I want to trigger certain events when the focus comes from outside my application (as opposed to some internal dialog or window being closed). As far as I know, currently in JavaFX there is only the boolean property focused, which does not help in my situation. In Swing, there was a method FocusEvent.getOppositeComponent, which allowed me to do just that: if the opposite component is null, then the window that previously had focus was outside my JVM. More generally, I think that knowing which Node/Control had focus when you gain it (or gained it when you lose it) would be valuable to other developpers. I'd like to request such a feature to be added in JavaFX. PS: I posted a question related to this on StackOverflow: https://stackoverflow.com/questions/56172580/equivalent-of-focusevent-getoppositecomponent-in-javafx Regards. From xuchao63 at huawei.com Thu May 30 08:38:34 2019 From: xuchao63 at huawei.com (xuchao (Q)) Date: Thu, 30 May 2019 08:38:34 +0000 Subject: Feasibility of supporting Linux Aarch64 for OpenJFX Message-ID: Hi, In the script to compile OpenJFX we found that Linux Aarch64 is not supported, but we tried to make some modifications, and now we can compile and pass all test cases on Aarch64. We want to know why Aarch64 is not supported until OpenjJFX13? If possible, we are willing to contribute the Aarch64 patch to the community. If there are any issues we have not considered, please give us feedback and we are willing to actively try to build the Aarch64 ecosystem. Thanks. Best Regards, ------------------------------------ Xu Chao 00464307 Language VM Lab,2012 Laboratories Mobile : +86-19121090429 E-mail : xuchao63 at huawei.com Address : Jinqiao Wanchuang Park,No.200 Jinsu Road,Pudong New District,Shanghai From johan.vos at gluonhq.com Thu May 30 09:22:08 2019 From: johan.vos at gluonhq.com (Johan Vos) Date: Thu, 30 May 2019 11:22:08 +0200 Subject: Feasibility of supporting Linux Aarch64 for OpenJFX In-Reply-To: References: Message-ID: Hi, That would be great. AArch64 is our main target for iOS and Android as well, so those scripts (in buildSrc/ios.gradle and android.gradle) probably show similarities. While working on OpenJDK 11+ on mobile (AArch64), we tried to make abstraction of the {linux/ios/android} specifics, and that work is now mainly OS-agnostic. It would probably be good to have something similar in OpenJFX, with a general AArch64 "port" that can then be extended by Linux/iOS/Android. - Johan On Thu, May 30, 2019 at 11:16 AM xuchao (Q) wrote: > Hi, > In the script to compile OpenJFX we found that Linux Aarch64 is not > supported, but we tried to make some modifications, and now we can compile > and pass all test cases on Aarch64. We want to know why Aarch64 is not > supported until OpenjJFX13? If possible, we are willing to contribute the > Aarch64 patch to the community. If there are any issues we have not > considered, please give us feedback and we are willing to actively try to > build the Aarch64 ecosystem. > Thanks. > > Best Regards, > ------------------------------------ > Xu Chao 00464307 > Language VM Lab,2012 Laboratories > Mobile : +86-19121090429 > E-mail : xuchao63 at huawei.com > Address : Jinqiao Wanchuang Park,No.200 Jinsu Road,Pudong New > District,Shanghai > >