Archive: Check/update to current JRE?


Check/update to current JRE?
I have an NSIS script I'm using to install a Java app. Works fine. However, I need to add the capability to check/update to the current JRE. I found a couple of old sample scripts, neither of which I can get to work. The newer one is here and it contains the link to the older one:

http://nsis.sourceforge.net/New_inst...ssing_jre.ini))

They both fail at compile time at:

InstallJRE:
File /oname=$TEMP\jre_setup.exe j2re-setup.exe

Giving: File: "j2re-setup.exe" -> no files found

It appears from the message that I need the JRE setup program, but don't have it. I have JDK 1.6 installed. Is this old code that has to be done differently now? No amount of Googling has turned up anything related to this that makes any sense. Appreciate any help anyone can offer.


Logically, to install JRE you need to have the setup file. If you don't have it, download it? You can do this at run time using InetC/NSISdl however with Java there is no static download URL. Therefore you cannot have a fully automated system - you are going to have to download a file from a hard coded URL that contains the URL to the latest JRE.

Stu