How to wget jdk from oracle site directly [duplicate]

This question already has an answer here:

I just need to wget JDK8 from oracle site directly into y docker ubuntu.

Either this or i need to know where apt-get install openjdk-8-jdk will install JDK in bubuntu..

I did a wget

1) wget –user {uname} –ask-password –header “Cookie: gpw_e24=http%3a%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk8-downloads-2133151.html; oraclelicense=accept-securebackup-cookie;” “http://download.oracle.com/otn/java/jdk/8u231-b11/5b13a193868b4bf28bcb45c792fce896/jdk-8u231-linux-x64.tar.gz

2) wget –user {uname} –password {password} –header “Cookie: gpw_e24=http%3a%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk8-downloads-2133151.html; oraclelicense=accept-securebackup-cookie;” “http://download.oracle.com/otn/java/jdk/8u231-b11/5b13a193868b4bf28bcb45c792fce896/jdk-8u231-linux-x64.tar.gz

tried with –no-cookies –no-check-certificate too.

same error

error:
3BkXjE [following]
–2019-11-28 04:41:35– https://login.oracle.com/oam/server/obrareq.cgi?encquery%3DVaQ2eeiERRwf6vsILWt67zbl5fDG3v6b8qMq5qGEXUQF7%2FBvqepCUTdSVb7njj86T8ZkQogeeNK18Osl2ABXFRoHZNnz3W4Dl9dGprFWjzetQ6OmxFVLAYTFCj8L2YxFV56qcQTlZNDCwePowr%2B89wEUGQL4wZ%2BcWEPIzQVxcBCPC6fC80kqG0%2B7N%2BDEVSCUedXF5owxs6qOWg%2F5dSYj2DREq%2BAGkOVAA29lxqJPYzfH4qWAR5Mwe54H%2B8V%2BfZW8oqs2%2FLE1ay0lOkE2KWwq6pz4fiVdOFa5rxqeCJWmvS4rN%2B3OwAg0YS8SeLwLapru%2F1wyL%2F7oQ2Np%2BpD04t%2BuoRpCVKmc61jAURjA23pfnGhyjq0EkMK7cGx7XDyipnfvvhZ29bdCVit9B5e6CAoMud%2F0bXDOvtbIhDXLZZVRDS5K0%2FXUypMc5kEurFdyLsIj1ZL4J8301SWNqWl4JxYqME%2BgNU3zKJZsSvrLFsg%2BtoI95zgEPEZVSJTfTBLNoKwvi5PciVhXPtB%2F83JdIMTVVA%3D%3D%20agentid%3Dedelivery-extprod%20ver%3D1%20crmethod%3D2%26cksum%3Dcf715369df8c1ad193a3e0490852ddfbcdf151b3&ECID-Context=1.005a62uQh5O7a6KaETu1US0001jo00B4K8%3BkXjE
Connecting to login.oracle.com (login.oracle.com)|209.17.4.8|:443… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: https://edelivery.oracle.com/obrar.cgi?encreply=57MVHje79UloJHIbY4xMqEX3TXcnmPEvzG2xEKNWrl609Egbqj7L7jUiV9S3LJK1Ku6xlJvhZUYCRUNY3b7DO7MgBE5WMsPXhk/rMXiGdq0MaeBRe92Tq+i0/h22fmxyiakGTZhXHJnnsm8n1XWmWdWRVShT/EhY6HgAPu6hlKjkX3uBYTkne40Y8hVQS6r13q1k355/3jzPC1gofbL813ec9FOnVyx3TBE4YtUsO9gkphmBGoVlhj3v916PgVOfOkWZ+PM6mhHxzNy7b7uc9aFv3U7SrMJEaBehWBxAQBVvk85gSa86WwcrcseGZm8Agnl/bT56J87O5MgSkl7x64wEO957hmcHCtPaFbTFdcyj/vJQOEir4K6tgdrgsxrcXPEQezErQ4fZuEJwpvHcqfls2XFveo8++zreqiFiSSzYu5FmEFK/GAjHWoxsPMysZ9U05tcBvZE2Ph63+WrVieIHZThwH++IXaIEs+FLYJv8Tg5QdXL8ZmcNm1rKOB9YRw6mnjVKTT6Hq6C137rOVRRhR4Xy88r2PvvJ/g+81jLT1HfJY5igQzOr6R7Nh6B6dYi1fYl629G+j19L4wvoXWBsXfcZgEWzKRa/CTuzTZTgwGmZHDthquReRDF26tQuPOXIhQXFBMC2HXhwlGqHUYnvsDGFvMCiaEFC+WX7W3UKExAGgvLEJGb9s/q/uzJrj8qnglOwjS9pkox54gY2ejDW6JtkgAvErfn3ntVqTbCpsKQknennQW+3xsLeM9/khQFz1bFDAaoHf3z01/DtKoj9juciuSOtIphVhMBDsSW1VB1USbbPwsEqOhb+CEJJNtLXnGoEwok9CrNb4ioQ9fp7NOH8X5sCEZUkFAkfs7xRzxQ9gifwh7Ze0Ow9LRsfQkF31FXesm4PiQnzSiPvjGlngPgLotU9AJ6jvr+G7wG9FJ4YkjJFJgrCK+1ZeJkt2nWd6gwjaF01/RLpv+eYks9bke9gqti3kI/Ibi9xQU/FdJ9eA4xPBdX0UfjOlQ9XgIsuvZPc1Aw24SZIJAwhrQiJwy5+zRA/7MIya95nOZ7iEIUNxd+kM0WpDj81sZgivqsZjdMyQRsZGtxSm5bMcQ5GAESifm+EYdEdA5K2r57VRJ5Bxd2EM8IV9+KK6QMdIt5fFC9ePPIwEnuD7R2pvMk8hE4WGJ4l+MngrN11K4i916kF72u2ozlZ4XqafEB5ednNntJKC8BzZP0YskNXBzZ1PME04I4eZobkDcv+taY=&cksum=e97f1a847a2742386f3cf3ee122fa33b16be31c0 [following]
20 redirections exceeded.

It is redirecting and failing

Help me with this

Source: StackOverflow