Review Request: 8001533: Java launcher must launch JavaFX applications
david.dehaven at oracle.com
Fri Nov 16 04:49:58 UTC 2012
>>> L496-517 somewhat duplicates the logic added for FX in the
>>> getMainClassFromJar method. Have you considered some refactoring
>>> work you could do to simplify the fix since I think once you get
>>> the classname of the entry point (either from a JAR or command-line
>>> and with and without the static void main method), the logic is
>>> essentially the same. To elaborate, I see that FXHelper.launchName
>>> L707-725 is needed mainly to give a useful error message. When
>>> you find the classname of the entry point, perhaps you can load
>>> the class and catch any linkage error and determine if it's caused
>>> by the absence of FX runtime and output an appropriate error.
>>> If the main class is successfully loaded, then proceed with
>>> L496-517 (or something like that). Just an idea you can explore.
>> Yes, I do feel that especially in the -jar case there is some repetition. The trouble is the ambiguity of ClassNotFoundException.
>> I'll poke at it and see what I can come up with.
> That's good.
I cleaned it up quite a bit, I think it looks a lot better now:
The comments still need some attention, I'll get that first thing on the morrow.
More information about the core-libs-dev