The easiest way to install the Oracle SQL Developer program in all currently supported versions of Ubuntu is to install sqldeveloper-package from the default Ubuntu repositories. sqldeveloper-package makes it possible to build a Debian package of Oracle SQL Developer. This utility will require you to download the architecture independent archive from https://www.oracle.com/technetwork/developer-tools/sql-developer, identified as "Oracle SQL Developer for other platforms", "Oracle SQL Developer for Multiple Platforms" or "Oracle SQL Developer for Linux and Unix" (depending on which version you are building), to create the Debian package from.
To install sqldeveloper-package open the terminal and type:
sudo apt install sqldeveloper-package
After installing, you can use it to build sqldeveloper by typing:
make-sqldeveloper-package /path/to/arch-ind-sqldeveloper-archive
This puts the build package in an autogenerated folder. Use
sudo make-sqldeveloper-package --install /path/to/arch-ind-sqldeveloper-archive
to directly install it on your system. You can get an overview of all commandline options with:
make-sqldeveloper-package --help
For running sqldeveloper you can connect to and use any JDK 1.8 (e.g. openjdk-8-jdk) or above.