title: How to accept jdk's license agreement in command line?
body: <p>I tried to install jdk7 (Linux x64 rpm) on to my Amazon EC2 instance. I used wget and curl -o to do so but it did not download successfully. Instead, it downloaded an error html file wherein it tells to accept the license agreement before downloading.
  I used this link <a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html" rel="noreferrer">http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html</a> to accept the agreement after which I right clicked on the package and copied the link and tried downloading it through command line, but it did not work.
  I downloaded it to my local machine and used scp to move it on to my local directory in EC2. But when I tried executing it, it threw these errors :</p>
  
  <pre><code>sudo rpm -i jdk-7u7-linux-x64.rpm
  Unpacking JAR files...
  rt.jar...
  Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/rt.pack
  jsse.jar...
  Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/jsse.pack
  charsets.jar...
  Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/charsets.pack
  tools.jar...
  Error: Could not open input file: /usr/java/jdk1.7.0_07/lib/tools.pack
  localedata.jar...
  Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/ext/localedata.pack
  </code></pre>
  
  <p>I googled for a solution and came across this link : <a href="http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html" rel="noreferrer">http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html</a></p>
  
  <p>Even though it says :
  "1. Download the file. Before the file can be downloaded, you must accept the license agreement." is there any way of accepting the license through command line?</p>
  
  <p>Thank you!</p>
  
  <p>I don't think this issue is caused by a problem accepting the license agreement (that is just to download), I think this is related to a buggy rpm package.  Post this rpm -i install, does java work? Can you navigate to /usr/java/jdk1.7.0_07/jre/bin and run java?</p>