0
votes

I'm trying to convert my java software jar into a Java WebStart application. I've managed to successfully deploy it as a WebStart with a jnlp file that provides details about the software's jar.

However, my software requires certain details to be stored locally in a file on user's machine. These details can be set & the file can be generated by having the user run another java software (a very small java utility software) coded by me. I wonder if it's possible to package in this smaller software's jar as well along with the main software using the tag. As far as I know, we can use the tag to specify additional jars/ libraries that our software jar uses.

Can we package in another java jar created by us in the jnlp and would it then get downloaded alongside the main software jar and other libraries (jars) when the user launches the jnlp ? Kindly let me know. Thanks.

P.S: I know that all jars downloaded by a WebStart application end up in the deployment cache. Is there no way to specify where they should get downloaded to ? In my case, I would prefer it if the 2nd software's jar gets downloaded in an easier-to-find location.

1
"..my software requires certain details to be stored locally in a file on user's machine." Use the PersistenceService of the JNLP API. "These details can be set & the file can be generated by having the user run another java software (a very small java utility software) coded by me." Run that as an ExtensionInstallerService. They are run once on install, and again at uninstall. Demos. of both can be found on my share drive. (N.B. In neither case does the code need to know where it is installed.) - Andrew Thompson

1 Answers

0
votes

Yes, it would be downloaded - but it would end up in the deployment-cache with no easy way to find it (names get all mixed up) or start it.

There's no way around webstart keeping the files in the deployment-cache: if you could specify the download-location different versions of jar-files with the same names and different codebase could end up in the same location causing no end of trouble.

I see two ways to get the wanted functionality:

  1. Add the ability to change the local configuration as an additional function in the main application. You probably can use most of the existing code but use a method-call instead of starting it as a separate application
  2. Create a second jnlp-file to start the configuration-program. From what you write it should be pretty small and not too much effort to create.