Unix/Linux Go Back    



Script to install jdk

Shell Programming and Scripting




Kindly Note - This is a Single User Post by Forum Member primp Regarding:
Script to install jdk.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 05-09-2008   -   Original Discussion by eamani_sun
primp's Unix or Linux Image
primp primp is offline
Registered User
 
Join Date: Mar 2008
Last Activity: 22 December 2008, 11:35 PM EST
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
This task is not difficult, you would normally install jdk on linux by doing something like:

./jdk-installer-bin

It'll prompt for you to accept the EULA which just requires "y" along with accepting other defaults.

I would go through the manual process and figure out if you want to use the defaults, come up with an answer file which is just the answer to each question with a newline separating.

Then have a script just do the following:


Code:
#!/bin/sh

./jdk-installer-bin < answer_file

This will provide you with an auto-answer to the installer, I mean you would probably want to check if there's a version that exists/etc. but that's the basic script if you wanted an automated/silent installer.