This is a fairly straightforward guide to install Oracle SQL Developer on Ubuntu 20.04
- Oracle JDK 8/11
- Oracle SQL Developer
- Go to download Oracle JDK page
- I will use Oracle JDK 11 because it has a .deb installation file which can be easily installed using
- Download Oracle JDK 11 for Debian package (at the time of this post, the version is 11.0.8), you will be prompted to sign in using oracle account to download
- Go to download Oracle SQL Developer page
- Download Oracle SQL Developer for Other Platforms (at the time of this post, the version is 20.2)
- Open your terminal, go to directory where your prerequisite files are located (in my case it's in
- Install Oracle JDK 11 by using command
sudo dpkg -i [YOUR_ORACLE_JDK_PACKAGE.deb], in my case it's
sudo dpkg -i jdk-11.0.8_linux-x64_bin.deb
- Verify your installation by listing the directory of
- Open your terminal, go to
/optdirectory. This is where i will store the sqldeveloper application, you can choose other directory, but this my preference (and i read also that
/optis for 3rd party apps that we cannot install via
- Unzip Oracle SQL Developer with command
sudo unzip [YOUR_SQL_DEVELOPER_FILE_WITH_LOCATION].zip, in my case it's
sudo unzip ~/Downloads/sqldeveloper-184.108.40.206.1842-no-jre.zip. By default the
unzipprogram will extract the zip file into the current directory, since we are in
/optnow, we don't need to specify target directory.
- Locate your Oracle JDK installation under
/usr/lib/jvm, we'll need this location to tell Oracle SQL Developer where our Oracle JDK is located. In my case it's
- Go inside the
- You can see that
sqldeveloper.shhas executable permission so that we can run it by doing
sh sqldeveloper.shin the current directory.
- Run the
sqldeveloper.shfile, you will be prompted to enter the Oracle JDK location, just paste it in and press enter
- You will see Oracle SQL Developer starting
- Installation done! You can use the application by executing the
At this point, the installation process is done and we can use the application. But it's quite troublesome for us to always open the terminal and execute the script to run the application.
- Open your terminal and type command
sudo ln -s [YOUR_SQLDEVELOPER.SH_PATH] /usr/local/bin/sqldeveloper, in my case it's
sudo ln -s /opt/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper
- Verify that link has been created.
- Now we can execute our application with command
sqldeveloperfrom any directory. The reason why we put our link inside
/usr/local/binis so that it's available globally.
- Go to your
$HOMEdirectory and execute the command
sqldeveloper. You will get an error like this.
- The error happened because it's trying to execute a syntax inside
sqldeveloper.shthat uses relative path to navigate the directory. To fix this problem, what we need to do is edit the
sqldeveloper.shto execute the sqldeveloper binary
sqldeveloper.shwith your text editor. In my case, i will use
vim. Remember to use
sudobecause this file belongs to
root. Your file content should look like this now.
- We will tell this script to execute the sqldeveloper binary directly without navigating to other directory by using this command
/opt/sqldeveloper/sqldeveloper/bin/sqldeveloper $*, your file should look like this now.
- Save the file and try
sqldevelopercommand again, you should be able to start Oracle SQL Developer now.
- Desktop shortcuts are stored in
.desktopextension. So we will create a new file in that directory with the name
- Inside your file should look like this.
[Desktop Entry] Name=Oracle SQL Developer Comment=SQL Developer from Oracle GenericName=SQL Tool Exec=/usr/local/bin/sqldeveloper Icon=/opt/sqldeveloper/icon.png Type=Application StartupNotify=true Categories=Utility;Oracle;Development;SQL;
- Save your file
- Verify that your shortcut is available to use by searching in application menu.
And that's it. You have completed the installation and created shortcut for Oracle SQL Developer.