7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Javaをwgetでダウンロード時にHTMLファイルが取得されてしまう

Posted at

OracleのサイトからJREやJDKをwgetで落とす時に、そのままwgetすると対象のファイルでは無く、htmlファイルがダウンロードされてしまうのでメモ

--no-cookiesでクッキーを使わない指定と
--headerでクッキーを指定してやれば、とりあえず落とせます。
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "ファイルURL"

下記のクッキーでダメでしたら、www.oracle.comのCookiesのgpw_e24の値を見て下さい。
Chromeであれば、Ctrl+Shift+iでヘッダー情報参照できます。

詳しい事は、stackoverflow参照して下さい。
http://stackoverflow.com/questions/10268583/cant-install-java-jdk-on-linux-through-wget-is-there-a-workaround

7
7
2

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
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?