I have a very simple batch file that lauches a Java app (Saxon) with the simple command "java net.sf.Saxon.transform...
"
This app requires java version 1.5.
This batch file will be used by 400+ users who each may or may not have some versions of the JRE installed on their machines.
I had thought that simply installing the most recent version of the JRE would solve the problem, but no: in some cases in our preliminary tests, although the most recent version of the JRE is installed (1.6.0_13), the command "java
" calls an old Java version (1.3.1...).
What would be the simplest (but most robust) way to do the following from the batch file:
- check which is the most recent JRE installed
- if most recent version is >= 1.5, then use this JRE from the batch command
- if not, tell the user to go download the most recent JRE
This should work even if there is no installed version of the JRE at all on the machine.
I have read a little about Java Webstart but am not sure it's the simplest tool for the job. I couldn't figure if it has to be installed, if it can run without any installed version of Java at all, etc.
What other tools are there for this?