JavaFX deployment through Java Web Start - Loading Progress Bar -


my app deployed javaws after user clicks on jnlp there long pause nothing seemingly happens, app pops on screen. javaws downloading jars in background there no progress indication, poor. set building custom one:

public class loadingprogress implements downloadservicelistener {     stage       stage;     textarea    log = new textarea();      public loadingprogress()     {         stage = new stage(stagestyle.undecorated);         stage.setscene(new scene(panebuilder.create().children(log).prefheight(300).prefwidth(300).build()));         stage.show();     }      @override     public void downloadfailed(url url, string version)     {         log.appendtext(string.format("failed url=%s version=%s\n", url, version));     }      @override     public void progress(url url, string version, long readsofar, long total, int overallpercent)     {         log.appendtext(string.format("progress url=%s version=%s readsofar=%d total=%d overallpercent=%d\n", url, version, readsofar, total, overallpercent));     }      @override     public void upgradingarchive(url url, string version, int patchpercent, int overallpercent)     {         log.appendtext(string.format("validating url=%s version=%s patchpercent=%d overallpercent=%d\n", url, version, patchpercent, overallpercent));     }      @override     public void validating(url url, string version, long entry, long total, int overallpercent)     {         log.appendtext(string.format("validating url=%s version=%s entry=%d total=%d overallpercent=%d\n", url, version, entry, total, overallpercent));     }  } 

and here jnlp below. notice tried using custom loader class in 3 different ways none of work on own or put together:

<?xml version="1.0" encoding="utf-8"?> <jnlp spec="6.0+" codebase="${url}" xmlns:jfx="http://javafx.com" href="companyapp.jnlp">      <information>         ... info ...     </information>      <update check="always" policy="prompt-update" />      <security>         <all-permissions />     </security>      <resources>         <jfx:javafx-runtime version="2.2+" href="http://javadl.sun.com/webapps/download/getfile/javafx-latest/windows-i586/javafx2.jnlp" />     </resources>      <resources>         <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" />          ... jar assets ...     </resources>      <jfx:javafx-desc main-class="com.mediacitizens.companyapp.presentation.desktop.main" name="companyapp" progress-class="com.mediacitizens.companyapp.presentation.desktop.loadingprogress" /> <!--  width="0" height="0" //-->     <application-desc main-class="com.mediacitizens.companyapp.presentation.desktop.main" progress-class="com.mediacitizens.companyapp.presentation.desktop.loadingprogress" />     <component-desc progress-class="com.mediacitizens.companyapp.presentation.desktop.loadingprogress" /> </jnlp> 

so none of makes difference. nothing interesting printed console either, full logging + tracing.

what going on?

i can't tell going wrong setup, don't need implement own downloadservice handle this. instead, recommend using javafx preloader following oracle's official java deployment guide preloaders. guide provides performance tips efficient startup of applications, including stuff such separating preloader it's own jar file, not blocking javafx application thread, enabling background update checks, marking jars lazy loaded, disabling auto proxy configuration etc.

by using tools in official oracle javafx deployment guide, should not need hand edit jnlp file tools should generate 1 load application efficiently.

following trouble shooting guide java desktop applications may pinpoint performance issues lie startup.

javaws downloading jars in background there no progress indication, poor.

that weird. how know jar download taking time? javafx system ships default preloader supposed show progress app jars downloading (it's blue progress bar in center of white screen).

"the javafx system ships default preloader" yes remember had time, think before added

i downloaded javafx 2.2.21 samples os x. went extracted sample directory , ran javaws ensemble.jnlp , standard preloader showed blue progress bar app started up. perhaps if used similar packaging instructions ensemble sample app, things work better you.

update

i noticed following reopened bug rt-25290 no default fx preloader jnlp app. mentioned earlier, don't encounter bug , default javafx preloader shows me on os x (java 8 build 88), i'm not sure under situations might encounter such bug, perhaps aware of nonetheless.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -