Re: Problem using JavaFX Application class

2016-02-27 Thread Alan Bateman
On 25/02/2016 19:24, Sander Mak wrote: : One more follow-up question: when I remove the main() method that invokes launch (see here: https://bitbucket.org/sandermak/javafx-application/diff/src/applicationmodule/application/Main.java?diff2=fca74ffbc28d&at=without-main), the following error com

Re: Problem using JavaFX Application class

2016-02-25 Thread Sander Mak
Hi Alex, > On 25 Feb 2016, at 20:59, Alex Buckley wrote: > > On 2/25/2016 11:24 AM, Sander Mak wrote: >> I'm not sure I follow this. ServiceLoader lives in the java.base >> module, and my service implementation class lives in my application >> module (without being exported). How is it not a 'su

Re: Problem using JavaFX Application class

2016-02-25 Thread Alex Buckley
On 2/25/2016 11:24 AM, Sander Mak wrote: I'm not sure I follow this. ServiceLoader lives in the java.base module, and my service implementation class lives in my application module (without being exported). How is it not a 'superpower' that ServiceLoader can reach into my application module's non

Re: Problem using JavaFX Application class

2016-02-25 Thread Sander Mak
In general, I think it's interesting that many frameworks want reflective access to what are essentially internal implementation classes. Spring comes to mind, you'd want to export interfaces but not Spring bean implementation classes, even though the framework needs access to instantiate them

Re: Problem using JavaFX Application class

2016-02-24 Thread Alan Bateman
On 23/02/2016 23:21, Sander Mak wrote: : However, is such an application class really something I want to export to other modules? Of course using a qualified export the scope can be restricted to the javafx.graphics module, and that's what I ended up doing. In the early exploration phase of

Re: Problem using JavaFX Application class

2016-02-23 Thread Sander Mak
Hi Kevin, Agreed that a little documentation goes a long way. Might it be an idea to support launching a JavaFX application through service binding at a later stage? Sander > On 24 Feb 2016, at 03:07, Kevin Rushforth wrote: > > Actually, I don't see any problem here, other than that we wil

Re: Problem using JavaFX Application class

2016-02-23 Thread Kevin Rushforth
I need a bit more time to think about it, but the fact that JavaFX need to access your application class to construct the instance and call the init, start, etc., methods is not an implementation detail. It is the specified behavior. And no, unlike ServiceProvider, there is no special power tha

Re: Problem using JavaFX Application class

2016-02-23 Thread Kevin Rushforth
Actually, I don't see any problem here, other than that we will need to document that if you want to launch a modular javafx application, you need to export the package containing your main class. This is an extension of what is needed today, which is that the class be public. If you use FXML,

Re: Problem using JavaFX Application class

2016-02-23 Thread Sander Mak
Hi David, Thanks for the quick response. Here is a small sample project: https://bitbucket.org/sandermak/javafx-application/src, the compilerun.sh can be used to start the app. I already alluded to the solution you propose in the original post. Indeed, when exporting the class that extends Appl

Re: Problem using JavaFX Application class

2016-02-23 Thread David Hill
On 2/23/16, 3:37 PM, Sander Mak wrote: Hi, Sander, we may not have tested Jigsaw with the path you are trying to take here. Certainly the common path of a class extending Application will launch properly, and I have been trudging through our test cases working on some odder paths. What I

Problem using JavaFX Application class

2016-02-23 Thread Sander Mak
Hi, When trying to run a module with a main class that extends javafx.application.Application, the following exception is thrown by the VM: Exception in thread "main" java.lang.RuntimeException: Unable to construct Application instance: class javamodularity.easytext.gui.Main at com.sun