You can download it from here for free:
And here comes the one-liner:
The command above downloads the OpenJDK 10 from adoptopenjdk.net (you can specify the source and type with -s and -t), extracts it, applies the latest time zone data from IANA by downloading, extracting and calling the latest time zone updater (you have to accept the Oracle license by specifying the -a option) and it saves .version files that store the URI of the actual download for re-run purposes (see below). In /opt/java/jdk/ you will then find symlinks that point to the latest latest updated OpenJDK 10 folder (and the latest tzupdater.jar if you run the script with -z). Now you have a fixed path that you can use to configure your IDE, apps, whatever.
sudo ./update_jre -az -s adoptopenjdk.net -t openjdk10 /opt/java/jdk/
If you re-run the script above, it will only download the bits if they are different from those that you have downloaded already (it simply compares the .version file), updates the JDK that you have specified with -t and recreates the symlinks. So with the update_jre script you stay up to date the easy way.
$ /opt/java/jdk/openjdk10_latest/bin/java -version openjdk version "10.0.1-adoptopenjdk" 2018-04-17 OpenJDK Runtime Environment (build 10.0.1-adoptopenjdk+10) OpenJDK 64-Bit Server VM (build 10.0.1-adoptopenjdk+10, mixed mode)
BTW, I started the update_jre script with downloading the JRE and therefore the script is called update_jre and not update_jdk.