Re: java webstart problem



Mark Thornton wrote:
Rogan Dawes wrote:
Mark Thornton wrote:

While we are talking about WebStart, I thought I'd mention a PHP utility that I wrote to allow those of us with cheap hosting plans to host WebStart-able applications easily.


How strange --- I've done one too! Mine is running on a little Synology DS-101j NAS device. One catch is that this device doesn't support the Apache mod_rewrite or the addHandler functionality and thus every resource to be downloaded needs a little PHP stub, and thus all the URLs end in .PHP (e.g. myapp.jar.php). This introduces a couple of further issues:

1. The first release of Java 6 doesn't then work with signed jar files. It gives a security exception. Subsequent (and previous) releases don't have this problem.

I have seen a problem with Java 6 where it throws SecurityExceptions if the signed .jar is empty. Is that what you are referring to?

2. Java 6 doesn't include pack.gz in the list of accepted encodings. Apparently this is also tied to the extension rather than the context.

3. Although the application then works, it never appears in the Java control panel applet's list of applications. Nor does it offer to create a shortcut or start menu entry.

You are probably missing something simple. You might like to compare the series of conversations between WebStart and your device, and between WebStart and a real download servlet using an intercepting proxy like WebScarab. You will probably see some missing headers or something.

My PHP script processes any local URL's in JNLP files to append the necessary .PHP extension, as well replacing $$ macros.

Anyway subject to the caveats above, I have now got it to work. Those issues and others meant it was a lot harder and took longer than I expected.

Neat.

As far as I can see the big problem is there is no minimum standard of what you can expect from a host in terms of what is permitted in .htaccess files. My Synology device is very restrictive in this respect. PHP also has a lot of 'optional' elements, so many useful functions may simply be missing. One of the advantages of Java is that
so much is guaranteed to be present. Not so with PHP.

Yes, you are absolutely right. The lack of consistency is a pity. I did tried not to use anything *too* sophisticated, but I guess you are running in a seriously resource constrained environment.

Mark Thornton

Regards,

Rogan
P.S. Sorry for the late reply, I have been travelling without access to my news feed.
.



Relevant Pages

  • Re: java webstart problem
    ... While we are talking about WebStart, I thought I'd mention a PHP utility that I wrote to allow those of us with cheap hosting plans to host WebStart-able applications easily. ... It works much as the Java JNLPDownloadServlet does, apart from supporting versioning of the jars. ...
    (comp.lang.java.gui)
  • Re: SimpleDateFormat.php - parse/format dates in PHP - download and use it!
    ... > Do you know SimpleDateFormat from Java? ... I was missing this class a lot, ... > so I wrote a PHP version: ... If you don't mind, already someone did that... ...
    (comp.lang.php)
  • SimpleDateFormat.php - parse/format dates in PHP - download and use it!
    ... Do you know SimpleDateFormat from Java? ... I was missing this class a lot, ... so I wrote a PHP version: ...
    (comp.lang.php)
  • Re: HTML "scrape" causes loss of query string in URL
    ... >> in PHP with several PHP scripts interacting with one Java servlet, ... >> which interacted with several Java classes. ... > process to go from PHP to JSP. ...
    (comp.lang.java.help)
  • Re: e-commerce portal
    ... haven't had a single site that sees a need for this sort of hardening. ... Java anymore. ... PHP is a technology that has gotten a harsh rap due to large security ... Marketing at its worse, eh? ...
    (comp.databases.pick)