javafx application launching

Kevin Rushforth kevin.rushforth at oracle.com
Wed Aug 22 05:40:23 PDT 2012


Unless you are running a Swing application that uses JFXPanel to show 
JavaFX content, the JavaFX Application class is the entry point for your 
application. This will continue to be the case.

If you use the JavaFX packager, you don't need a main() method to call 
into Application.launch, since the packager includes a special "Main" 
launcher class into the application jar file. Calling 
Application.launch() directly from a main method is primarily a 
convenience for running your app in an IDE other than NetBeans.

In JDK8, the java launcher will be updated to know how to launch JavaFX 
applications directly without the need for the special "Main" launcher 
class, although there will still need to be a jar manifest entry to 
identify the FX Application class. The details are still being worked out.

-- Kevin


Michał Zegan wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>  
> Hello.
>
> I have one question regarding app launching of javafx, because my
> information may be outdated:
> You needed to call Application.launch (Class, args); in the main method
> of the application.
> What will be the future method of launching javafx apps?
> I've heart something about the java launcher supporting this, but how
> would it work?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>  
> iQIcBAEBAgAGBQJQNIRTAAoJEIm05B02l8E6AKoP/ia49Z4U7/EUm+L/0xm2qND2
> peldnpibO4ePY2k6AKRu7sBnYlDCEAGTH2TcuaMUjACQesHESeZt3gX8lOuKIyWl
> Pym67paTepcyQBY9yFhHKvk1GVn05kUR/5uUEVmIkzBGtEzW+uPLeypVrHqWpytM
> E3USfrawdT9Gi+3Vq3sEFJ2Bu93SF5UNQk9O6+b8mVvB/k1t9wIp/JRqhPma7aRU
> alauSbefGyzg3ZYzYeoTUAxzkE9o9w92k+mvSB9vfS/8ca1xUYkhVbL1k1IX7dlR
> zcmyiSkWci59KvKJr9UenhxWvrsv6K0S89OkdglsJJ+KW0Ppk+4WJrM4+0vII7y4
> /7nrxMuQVEcDrosd2o2CHkOtaG9ztrimi8TpRPSB++ydvPB5kQT3WP+gBS5ni2nq
> RtTb1JDpX47uKrVimJhL+6S2I4y3ipvZeaI2J1hXicsbmq3O5PQ3+SVcBYuOW2uX
> hz2+k7cYX0S6tztEoBLkSxpSNCodWRhHoMjp7jnngvl1M6CitI6xRPVnNAtuFoH+
> 8It+GK6Wk2yIU51HL0ymPcYXmRUnETW/cNeA3ymTmx85SHE4q8v3BWAoyLv3jyyV
> /ch6X3osKVLAoJjPWKBo/kQeQcXchyWCvMwxYO4v6aTZjN5M8GcKLo9WQ1T8VE1P
> ou8RtVqcoOzdyueeObOo
> =OdM+
> -----END PGP SIGNATURE-----
>
>   


More information about the openjfx-dev mailing list