Automate Java installs on Unix
The installer scripts may vary on each platform but on Linux, there are 3 hurdles you need to overcome:
- Spacing through the long EULA
- Entering "yes" to accept the EULA
- Pressing Enter after the install is done.
You can get away with this by echoing yes and a newline in to the script while redirecting stdout to /dev/null
so that the EULA isn't printed:
echo "yes" "\n" | ./jdk-6u16-linux-i586.bin 1>/dev/null
You may have to tweak this on Solaris
Have a look at how Hudson does it. It can dynamically download and install at least Java 1.4, 5 and 6 from Sun in the background.