1

I have a web application (written using GWT) that used to load a Java applet in order to perform some tasks, such as writing/reading a file on a local filesystem and printing to multiple printers. Since Java applets are no longer supported in Chrome and are generally deprecated I need to find a suitable alternative.

My Web app should send and receive data from Desktop Java app. This communication should be implemented locally since it has to work even when client is offline (web app continues to work when user is offline).

I considered building a Chrome extension that uses Chrome Messaging API to communicate with Web app as well as Desktop app (pass data between them and act as a mediator). This can work but I am wondering if there is a cross-browser way of achieving this?

I've also considered building a web server inside Desktop Java app and then call http://localhost:port from the web app, but I'm not sure about possible negative security (and other) implications of this approach.

What would you recommend? Thanks!

nikolalj
  • 11
  • 2

1 Answers1

0

Since you use chrome, there is support for HTML5 Filesystem features. For example as described here: http://www.noupe.com/design/html5-filesystem-api-create-files-store-locally-using-javascript-webkit.html

GWT supports no Filesystem access directly, only local browser storage. So you need to wrap it yourself or use the elemental.* api (http://www.gwtproject.org/articles/elemental.html) to gain access to the elements directly and wrap them into widgets.

You may find this discussion helpful as well: GWT Websockets with Elemental

Community
  • 1
  • 1
thst
  • 4,592
  • 1
  • 26
  • 40