FULL PRODUCT VERSION :
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) Client VM (build 25.77-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
When starting my JavaFX application on the command line with 'javaws.exe <JNLP>' the ui toolkit 'com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter' gets selected by default. This leads to a relaunch and therefore slows down the application start significantly (and IMHO unnecessarily). Here's the output of the trace:
[...]
preloader: Construct preloader delegate adapter=class com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter
[...]
basic: Relaunch because: [current UI toolkit does not match]
[...]
ui: plugin2manager.parentwindowDispose
Plugin2Manager calling stopFailed() because of exception during AppContext.dispose()
If, however, I start the application by entering the JNLP URL directly in the browser the correct ui toolkit 'com.sun.deploy.uitoolkit.impl.fx.FXApplet2Adapter' gets chosen right away (no relaunch):
[...]
preloader: Construct preloader delegate adapter=class com.sun.deploy.uitoolkit.impl.fx.FXApplet2Adapter
[...]
I haven't found any option to tell javaws.exe explicitly to use the correct ui toolkit right away. This seems like a bug to me as it is working as expected with the browser!
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Enable tracing (level=all)
2. Start a JavaFX application, i.e. http://download.oracle.com/otndocs/products/javafx/2/samples/Ensemble/Ensemble.jnlp with your browser (only one trace file is generated)
3. Start the same JavaFX application via command line 'javaws.exe <JNLP>' (two trace files are generated, in the first one you'll find that the "wrong" ui toolkit was selected, leading to a relaunch)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Only one trace file is generated, the "correct" ui toolkit is chosen right away, avoiding an unnecessary relaunch
ACTUAL -
Two trace files are generated, in the first one you'll find that the "wrong" ui toolkit was selected, leading to a relaunch
ERROR MESSAGES/STACK TRACES THAT OCCUR :
[...]
preloader: Construct preloader delegate adapter=class com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter
[...]
basic: Relaunch because: [current UI toolkit does not match]
[...]
ui: plugin2manager.parentwindowDispose
Plugin2Manager calling stopFailed() because of exception during AppContext.dispose()
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) Client VM (build 25.77-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
When starting my JavaFX application on the command line with 'javaws.exe <JNLP>' the ui toolkit 'com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter' gets selected by default. This leads to a relaunch and therefore slows down the application start significantly (and IMHO unnecessarily). Here's the output of the trace:
[...]
preloader: Construct preloader delegate adapter=class com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter
[...]
basic: Relaunch because: [current UI toolkit does not match]
[...]
ui: plugin2manager.parentwindowDispose
Plugin2Manager calling stopFailed() because of exception during AppContext.dispose()
If, however, I start the application by entering the JNLP URL directly in the browser the correct ui toolkit 'com.sun.deploy.uitoolkit.impl.fx.FXApplet2Adapter' gets chosen right away (no relaunch):
[...]
preloader: Construct preloader delegate adapter=class com.sun.deploy.uitoolkit.impl.fx.FXApplet2Adapter
[...]
I haven't found any option to tell javaws.exe explicitly to use the correct ui toolkit right away. This seems like a bug to me as it is working as expected with the browser!
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Enable tracing (level=all)
2. Start a JavaFX application, i.e. http://download.oracle.com/otndocs/products/javafx/2/samples/Ensemble/Ensemble.jnlp with your browser (only one trace file is generated)
3. Start the same JavaFX application via command line 'javaws.exe <JNLP>' (two trace files are generated, in the first one you'll find that the "wrong" ui toolkit was selected, leading to a relaunch)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Only one trace file is generated, the "correct" ui toolkit is chosen right away, avoiding an unnecessary relaunch
ACTUAL -
Two trace files are generated, in the first one you'll find that the "wrong" ui toolkit was selected, leading to a relaunch
ERROR MESSAGES/STACK TRACES THAT OCCUR :
[...]
preloader: Construct preloader delegate adapter=class com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter
[...]
basic: Relaunch because: [current UI toolkit does not match]
[...]
ui: plugin2manager.parentwindowDispose
Plugin2Manager calling stopFailed() because of exception during AppContext.dispose()
REPRODUCIBILITY :
This bug can be reproduced always.