Download Oracle Java JRE / JDK in linux using wget by bypassing license

Oracle has recently disabled direct download of java from their servers. So to download java , users have to visit their site via web browser and have to accept their license and terms , then users will get the download link. But if you are working of linux servers in which you can’t access the web browser , then you should use wget command on the console