RFR 8004547: Extend JavaFX launcher support... (original) (raw)

Mandy Chung mandy.chung at oracle.com
Sat Dec 22 16:07:37 UTC 2012


On 12/21/2012 5:52 PM, Kevin Rushforth wrote:

David DeHaven wrote:

This explains what caused the confusion - I didn't expect that "java -jar fxapp.jar" will be passed to fxlauncher with the same launch mode as "java -cp fxapp.jar SomeFXAppClass" (i.e. LMCLASS). I think the semantics there was not obvious why it is not LMJAR mode but JAVAFXLAUNCHMODExxx has a different semantics than LMJAR and LMCLASS that are defined in java.c and also LauncherHelper. Is there any reason why "java -cp fxapp.jar" can't be passed to fxlauncher with LMJAR mode? That'll be consistent how launch mode is used in java.c and the non-FX app. I'll leave it for you and Kumar/Kevin to decide if this is important to address.

I think what you're asking is why can't we always use "LMJAR" if java was launched with "java -jar fxapp.jar", correct? Even if there are no JavaFX-* attributes in the manifest.

To be specific - when the fx app is launched by "java -jar fxapp.jar", it's a JAR file and shouldn't it be passed to fxlauncher as in JAR file mode? I had assumed that the fxlauncher may need to read the manifest if it's launched as a JAR file regardless of the presence of JavaFX-Application-Class attribute (but maybe not with the understanding I have in this discussion).

Reading your reply and Kevin's reply, the launchMode parameter of the launchApplication method (i.e. fxlauncher) specifies whether fxapp.jar has a JavaFX-Application-Class attribute or a FX app entry point (that could be a JAR file or specified in the classpath) and also indicate the name parameter is a class name or a JAR file name - that is not what LM_JAR and LM_CLASS mean in java.c and LauncherHelper. Strictly speaking the parameter is not launch mode to me.

I don't object to what you have. Aside from this issue, your change looks really good. Additional comments for the launchApplication method would really help. Thanks for the explanation.

Happy Holidays and Happy New Year. Mandy



More information about the core-libs-dev mailing list