I have a working JNLP application which I need to distribute to various non-technical end users.
If the user's machine has a recent JVM installed, everything is fine. They just double-click the JNLP file I send them and Java Web Start does the rest.
Now I would like to distribute something that works with or without a JVM, e.g. a .exe file that auto-downloads a compatible JVM if none is present, then invokes javaws.exe to download the .jar files and launch the application.
Launch4J is the closest match I have found, but it cannot launch a program through javaws.exe. The only options are java and javaw
I would like a product that can:
- Generate a self-contained
.exefile that does not require a JVM to be pre-installed - Parse the
.jnlpfile and determine the correct JVM to download if necessary (I know Java Web Start can download a JVM if necessary, but I want to avoid having to download two, the first to bootstrap Java Web Start and the second to run the application which may require a specific but different JVM.) - Download and install the JVM automatically, not simply direct the user to a Java download page or open a new installation wizard.
- Prompt for an admin password if necessary (for permissions to install the JVM. I don't think this is built into the Sun JVM installers.)
- Show only one security dialog (I would like to prompt the user just once, to confirm they trust the generated
.exe, but I do not want a second prompt to confirm they trust the.jarfile which will be from the same source and signed with the same certificate.) I assume this will require the auto-downloader to install the certificate before launching JWS.) - (not essential) Download application resources (e.g.
.jarfiles) in the background simultaneously with the JVM. This would require the cache to be running before the JVM is installed, so the cache would have to be implemented in native code and theDownloadServicewould later interface to it using JNI.
Does a product like this exist? I suspect it does not but It's worth a shot.
Update I found this article which has solutions to some related problems, though it is designed for offline installation and I am mostly concerned with online installation.