Downloading Oracle JDK via Shell / Script

The most common reason you’d want to do this is if you have a remote server which you can only access via SSH. Downloading jdk first to your computer then uploading it is an option but often it’s slow. Here’s how you can download it directly from your SSH shell:

  1. Using Google Chrome browser, go to Oracle JDK download page, pick the jdk package you want to download
  2. Press F12 to open Chrome’s developer tools. Go to Network tab. networktab
  3. Accept the user agreement on Oracle’s website, and click the package link
  4. On developer tools window, find the first entry that has your package name. Right click and select Copy as cURL copycurl
  5. Now the curl command required to download the package is in your clipboard. You can paste this to your remote server’s SSH session and use it to download the package directly
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s