This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Applets and the fly likes Download progress bar freezing up when downloading Jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Download progress bar freezing up when downloading Jar files" Watch "Download progress bar freezing up when downloading Jar files" New topic
Author

Download progress bar freezing up when downloading Jar files

Corne Vermeulen
Greenhorn

Joined: May 09, 2013
Posts: 6
I am trying to create a download progress bar that shows the progress of the download of a Jar file. I have 1 jar file that loads multiple others, so from within the main Jar file, I have callbacks that call back to the javascript of the HTML. I want to use these callbacks to update a html progress bar through javascript.

This is what I have so far:

When the javascript receives a callback from java, I print it to the console, and also change the text of the loading bar.



The status prints fine in the browser console, but the loading bar text is only updated after the Jar file has been downloaded (It only shows 100% and nothing in between) In other words, It freezes completely until the downloads are all done.

I call back to Js using the following line of code at multiple places within my Java:

window.call("LoadingState", new Object[]{50,"Updater"});

And this is what the console receives:


However, nothing happens on the progress bar until the loading is completely done. Is there a way to get around this freeze?
 
 
subject: Download progress bar freezing up when downloading Jar files
 
jQuery in Action, 3rd edition