tags:

views:

19

answers:

0

I only see one JOptionPane get spawned with the following implementation...:

public class DownloadServiceListenerImpl implements DownloadServiceListener {
 static DownloadServiceWindow win;

 /**
  *  This class must have a no-arg constructor per the API
  */
 public DownloadServiceListenerImpl() {
 }

 @Override
 public void downloadFailed(
   java.net.URL url,
            java.lang.String version) {
  JOptionPane.showMessageDialog(win.frame, "fail:" + url);
 }

 @Override
 public void progress(
   java.net.URL url,
            java.lang.String version,
            long readSoFar,
            long total,
            int overallPercent) {
  JOptionPane.showMessageDialog(new JFrame(), "progs:" + overallPercent);
 }

 @Override
 public void upgradingArchive(
   java.net.URL url,
            java.lang.String version,
            int patchPercent,
            int overallPercent) {
  JOptionPane.showMessageDialog(new JFrame(), "progs:" + overallPercent);
 }

 @Override
 public void validating(
   java.net.URL url,
            java.lang.String version,
            long entry,
            long total,
            int overallPercent) {
  JOptionPane.showMessageDialog(new JFrame(), "progs:" + overallPercent);
 }

}

There is at least one JOP being displayed, so I think my implementation is connected decently... but I only see one call. Doesn't seem to make a lot of sense to me, but maybe there is something I'm missing. The problem reproducible, but not completely consistent... on linux with j6u21, I see one JOP with 0 percent. On my macbook with j6u20, I see one JOP with 100%. On windows 7, the behavior is the same as the mac.

One possibly related thing is that I have been seeing requests for .jars, despite having

<property name="jnlp.packEnabled" value="true"/>

set in my jnlp, which should make it request gzipped pack200 versions of the jars. This only happens after adding the progress-class="" attribute to application-desc... which is confusing... and things succeed eventually, so it's obviously requesting the packed stuff also.

Cross-post on the sun JWS forums here.