Replace Applet in downloading and executing a file

519 views Asked by At

I have an application that has an applet that does two simple things:

  • Download an executable jar file from our server (if the user doesn't already have it) to an specific folder in the user's PC
  • Execute the jar file with the corresponding parameters

This jar file monitors an Office file for changes and send it back to our server.

The problem is the war Chrome is creating with Java with this NPAPI thing. So I have until September to think of an alternate technology or stop the Chrome support.

Do you think of some other way to achieve the same result? Just download and execute. Doesn't seem that hard =(. Can HTML 5 do that?

EDIT

I was looking into Java Web Start and became a little happy. It appears that it can do what I want: executing a up to date jar file passing parameters. But I never worked with JWS, so I have some doubts:

and it didn't work that way. I had to mark "always open files of that type" on Google Chrome. Is there a way for automatize it?

Thanks again!!

1

There are 1 answers

1
Marged On

From what I know there are at least two things that allow you to stick with Java.

Webstart is provided by Oracle and allows you to download Java program from the web and execute them. Update mechanisms exist, so you can always provide a current version.

Install4J (or any other installer for Java applications that offers an update mechanism) provides an installer which enables your customer to install an application which afterwards will be kept up to date by the integrated update mechanism. But Install4J comes at a price, there might be freeware / open source alternatives. Install4J and its alternatives are often discussed here on SO, you might want to check here.

I think the FileAPI of HTML5 is limited and can not access arbitrary files because a sandbox prevents this. You might check SO again for details about that.