9

Every time I click a Java Webstart button, Firefox downloads the JNLP file and puts it in my Downloads folder. I have over 500 JNLP files from my JWS app called name-123.jnlp and so on. Internet Explorer doesn't do this, is there a way to stop Firefox from doing it ? I'm the app's developer, so server side changes are possible too.

Additional info: I set the mime type correctly on the server.

J. Stoever
  • 856
  • 12
  • 20
  • Temp files should be ending up in the temp dir, not Downloads.. unless you're on Mac, of course. Was the testing done on Windows (as the comparison to MSIE suggests)? – Boris Zbarsky Nov 26 '11 at 04:51
  • Yes, the problem is that Firefox (on Windows at least) doesn't seem to treat .jnlp files as temp files, but as downloads. – J. Stoever Nov 27 '11 at 13:23
  • Hmm. So it's opening the file in a helper application, but putting it in Downloads? Or is it opening it in a plug-in? – Boris Zbarsky Nov 27 '11 at 14:56
  • If you want to call Java Webstart a helper application, I guess. Not really sure what the distinction is. From your profile I assume you're not familiar with JWS (God knows it's not popular), so if you want to try (you need Java installed of course): http://www.toadwater.com/webstart/JTWC.jnlp In IE, clicking the link will properly launch the application and put the jnlp file into some temp dir. In Firefox it will look as if you downloaded something, and if you click it more than once, it will store multiple copies in your Downloads folder. – J. Stoever Nov 27 '11 at 20:56
  • The distinction is one of launching a separate binary with a local filename (this is the helper application case) vs loading a DSO that operates on internal data (plugin case). The former requires that the file be downloaded to somewhere on disk; typically the temp folder. The latter can do all sorts of stuff depending on what the plug-in tries to do. It may be worth doing a log per the instructions at https://developer.mozilla.org/en/HTTP_Logging but using NSPR_LOG_MODULES=HelperAppService:5 to see whether this case is being treated as a helper app. – Boris Zbarsky Nov 28 '11 at 09:11
  • Tried that, log file stays empty (but gets created) with your parameters. With the parameters from the link it gets filled, but I guess not with information relevant to this issue. – J. Stoever Nov 28 '11 at 10:07
  • application/x-java-jnlp-file, and I just have the normal Java stuff installed. – J. Stoever Nov 28 '11 at 21:30
  • Does your about:plugins list that type anywhere? – Boris Zbarsky Nov 29 '11 at 02:08
  • No, nothing about jnlp at all. – J. Stoever Nov 30 '11 at 08:33
  • OK, so presumably it's happening via a helper app. That's really odd, then. The code I'm looking at in Gecko definitely uses the OS-default temp dir on Windows for files opened via helper apps... – Boris Zbarsky Nov 30 '11 at 19:59

1 Answers1

-1

You can try following

  1. In your Firefox browser, go to Edit >> Preferences >> Applications, in Content Type select the option "use other" for jnlp files 2.In the dialog box, select the "javaws" file location (for me, it was located in "/usr/java/jre1.6.0_16/bin")

I have it working on Ubuntu

peter_budo
  • 1,748
  • 4
  • 26
  • 48
  • 1
    It already does that, my issue isn't with JNLP not running, it's that instead of putting the JNLP into the temp folder like it should it's putting them in the Downloads folder and littering it up with copies every time the button is clicked. – J. Stoever Nov 25 '11 at 11:44