2

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.

2 Answers 2

6

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

1

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.

1
  • 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. Mar 25, 2011 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .