0

I'm working on a project where I'm supposed to launch an Eclipse RCP-Project with JNLP. Now, I've just got introduced to the JNLP-World and don't really get everything straight. I saw that, there's a way to structure the download of resources with a DownloadService to manage the java cache.

After searching on the internet i found some examples... But none really explains how and where to use the DownloadService. So these are my questions.

Let say I've got a simple RCP-Plugin:

  1. I already exported and signed it the jar.
  2. The jar with the jnlp files are already on my tomcat server running locally
  3. Where am I supposed to implement my main class running an instance of my DownloadService and how should i register it in my jnlp file?
  4. I guess my question is how can i get jnlp only to download the resources, which have changed?

I would be more than thankful if anyone provide me with some explanations or simple examples.

Thanks.

Lycone
  • 650
  • 9
  • 18
  • *"how can i get jnlp only to download the resources, which have changed?"* It does that automatically. The only real reason to use the `DownloadService` is to take greater control of when the checks for updates are performed. E.G. it might normally be done by default at start-up, but if you wish to offer a 'check for updates' menu item, that's where you might use the `DownloadService`. – Andrew Thompson Nov 03 '17 at 09:58
  • When i deployed the jar files, i usually extend them with a time stamp. Let say i start the with 2 "different" version, how does the java cache know with version to start and which one the remove from the cache? – Lycone Nov 03 '17 at 15:14
  • It should always use the one with the later file time-stamp. – Andrew Thompson Nov 04 '17 at 00:18
  • Ok... I guess, i didn't explain it very well. Look, i actually tested it by starting the jnlp file first from http and second from a https server, than looked into java cache. The resources were actually double there, each starting with http and https. So i concluded that this can be a problem, if the jnlp just looks at the url and decides which resources to load. Obviously it doesn't check the MANIFEST.MF to complete this task. Of course you can say, those are different resources because of the 2 different servers. Than how to make sure jnlp doesn't load the same resource twice? – Lycone Nov 04 '17 at 10:55

0 Answers0