Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

It is quite easy to install java sun jdk 1.6.x using xxx.rpm.bin installer from java.com, but it forces you to press "Enter" for the license agreement during installation. This is a problem for me as I need to create script to install java jdk automatically. Anyone know how to avoid this issue? Thanks.

share|improve this question

2 Answers 2

The linux command "yes" can repeatedly press a key (default is y)

yes | ./jdk-6u24-linux-x64.bin

Pretty simple, If you want it to just hit <Enter> do:

yes '' | ./jdk-6u24-linux-x64.bin

See more at http://www.computerhope.com/unix/yes.htm

share|improve this answer

I presume you already add executable attribute to the bin file:

echo | ./jdk-6u24-linux-x64.bin

Or if is expecting Y,y or yes:

echo y | ./jdk-6u24-linux-x64.bin

Now, just be patient and wait until the end.

share|improve this answer
    
While this will work if it is expecting one <Enter> or y, if it is expecting more than one you will need to use a command like yes. –  Jade Robbins Mar 25 '11 at 18:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.