LoginSignup
12
14

More than 5 years have passed since last update.

curlでOracle JDKを取得する

Posted at

はじめに

curlでOracle JDKを取得する方法を記述します。

JDKのダウンロードには、ライセンス(Oracle Binary Code License Agreement for Java SE)への同意が必要となります。
同意できる場合のみダウンロードしてください。

環境

  • CentOS 6.5
  • curl 7.19.7

JDKを取得する

単純にダウンロードするJDKのURLを指定すると、HTMLがダウンロードされてしまいます。
cookieを送信することで、期待通りにJDKをダウンロードできるようになります。

$ curl -LO -b "oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm"

上記では、Java SE Development Kit 7u55をダウンロードしています。

リンクのURLは以下のページから確認をおこなえます。

参考

12
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
14