I usually build packages for my Slackware, with SlackBuilds. I download the source with wget, and I use the variables.
With a link like this, no problem when the version change, instead of 16.0.1, I put 17.0.1 and it download automatically, then I build...etc..
VERSION=16.0.1
https://download.java.net/java/GA/jdk${VERSION}/GPL/openjdk-${VERSION}_linux-x64_bin.tar.gz
The problem is when in the url appear some random number which change for every release! In this example are 7147401fd7354114ac51ef3e1328291f and 9
VERSION=16.0.1
https://download.java.net/java/GA/jdk${VERSION}/7147401fd7354114ac51ef3e1328291f/9/GPL/openjdk-${VERSION}_linux-x64_bin.tar.gz
I can use variable substitution, but is a little bad, someone know a more elegant method to get the new "random" number when they change it? With wget or curl.