Install SQL Developer 4 in Ubuntu 14.04 howto guide

Version 6
Visibility: Open to anyone

    How to install Oracle SQL Developer 4 in Ubuntu Linux






    1    Introduction



    1.1    About


    This guide explains how to install Oracle SQL Developer under Ubuntu Linux and also contains additional information that is not mentioned elsewhere. It is not meant to be a complete reference or substitute for documentation provided by Oracle. Please use at your own risk.



    The information presented in this document has been written solely by the mentioned author in the hope to provide useful information for members of the Oracle community forum. This document is provided under the terms of using the Oracle Web sites available at

    Please do not plagiarize the information. Thanks!

    Copyright © Dude! 2014.


    1.3    Contact


    If you have questions or suggestions about this document, please feel free to reply to the following thread:

    Guide: How to install Oracle SQL Developer 4 in Ubuntu Linux


    Best of luck!




    2    Installation Requirements


    2.1    Operating System


    The following was tested under Ubuntu 14.04, but may also work for other recent OS release versions. Please see the Oracle installation guide for the recommended minimum system requirements; an appropriate URL is shown at the end of this document. The documentation does not specifically mention Ubuntu Linux, however, the requirements apply to any Linux installation.


    Please note that the hard disk space requirement is different than outlined in the Oracle installation guide:


    Product DownloadInstall

    SQL Developer

    JDK 7

    232 MB

    136 MB

    304 MB

    285 MB

    Total disk space required, including 600 MB for installation processing: 1.6 GB



    2.2    About OpenJDK and Oracle JDK

    The Oracle SQL Developer is a multi-platform Java based application that relies on libraries included only in the Java Development Kit (JDK), also known as the Java Standard Edition (Java SE) Development Kit. Oracle SQL Developer 4 requires Java JDK 7.

    Note:Oracle SQL Developer requires at least Java JDK 7 version 1.7.0_51.
    Java SE 8 is strongly compatible with Java SE 7, but not supported.



    Canonical, which is the company behind Ubuntu, provides OpenJDK (Open Java Development Kit) as the standard Java for Ubuntu Linux. OpenJDK is an open source implementation of Java SE (Java Standard Edition) and distributed under GNU GPL (General Public License). It is available from the standard Ubuntu Linux software repository.

    Oracle JDK is available for free, like OpenJDK, but not distributed under GNU GPL licensing. GNU GPL is a Copyleft license and not suitable for Oracle Java SE, which contains commercial features and licensing from other software vendors. Oracle JDK 7 is only available from Oracle and not included in the Ubuntu Linux software repository; and hence not known by Ubuntu's software dependency and compatibility management.



    OpenJDK is the official Java SE 7 reference implementation (RI). It is the gold standard for all Java implementations and the basis for future Oracle JDK 7 update releases. Although Oracle SQL Developer can run using OpenJDK, Oracle JDK is the Java requirement according to Oracle support and generally known to provide better stability and performance than OpenJDK.




    3    Installing Oracle JDK




    It is not necessary to configure Oracle JDK as the system-wide default or to replace OpenJDK in order to run SQL Developer.



    1. Login at the computer console and type  Ctrl-Alt-t to open a terminal window.
    2. Type the following command to determine your system architecture:

      uname -m

      Note:If the command output is x86_64 you need to download Java for x64 (64-bit),
      otherwise, if it shows i686 or similar, you need to download Java for x86 (32-bit).

    3. Open the following URL in your web browser:

      (if the link does not work anymore, simply search Google for "jdk 7 download")

    4. Scroll down and select the Accept License Agreement button.
    5. Download the tar.gz installation for Linux x86 or x64 according to your system architecture.

    6. Select Save File to download the file to your Downloads directory, if the browser prompts you.
      Please wait for the download to complete before proceeding...!

    7. Enter the following commands into the terminal window:

      cd Downloads
      sudo mkdir -p /opt/java
      sudo tar -zxf jdk-7*.tar.gz -C /opt/java
      ls /opt/java

      sudo ln -sf /opt/java/jdk1.7.0_60 /opt/java/jdk

      ls /opt/java/jdk

      When prompted for the password, type the password of your user account and press return.
      Use the correct version of Java JDK you installed when creating the symbolic link, e.g.:  jdk1.7.0_60




    4    Installing SQL Developer

    At the time of this writing, Oracle does not provide an installation package to set up SQL Developer using the standard software management facility of Ubuntu Linux or any other Debian based Linux.


    Oracle supports the Red Hat Package Manager (RPM) and tools exist to convert such installation packages to Debian based Linux, including Ubuntu. Although compatibility is generally limited due to different Linux system designs between Red Hat and Debian, the package conversion works fine for SQL Developer and saves additional installation steps, as well as allowing standard software management.

    1. Open the following URL in your web browser:
      (if the link no longer works, simply search Google for "SQL Developer download")

    2. Select the Accept License Agreement button.
    3. Download the  Linux RPM  installation package.
    4. The system may prompt you to type your OTN access credentials.

    5. Select Save File to download the file to the Downloads directory, if the browser prompts you.
      Please wait for the download to complete before proceeding...!

    6. Type  Ctrl-Alt-t  to open a terminal window and type the following commands:

      sudo apt-get -y install alien
      cd Downloads
      ls sqldev*
      sudo alien -ic sqldeveloper-
      ls /opt/sqldeveloper
      ls -l $(which sqldeveloper)
      a=$(which sqldeveloper)
      ls -l /opt/java/jdk
      sudo sed -i "1 i unset GNOME_DESKTOP_SESSION_ID" $a
      sudo sed -i "1 i export JAVA_HOME=/opt/java/jdk" $a
      cat $a

      When prompted for the password, type the password of your user account and press return.
      Use the correct file name (version) of the sqldeveloper according to the RPM file you downloaded!
      Converting and installing the RPM file may take several minutes without showing any progress, please be patient.


    7. Press the Dash button in the Launcher to search for SQL Developer and click the icon to open the application.

    8. Right-click the SQL Developer icon in the Launcher and select Lock to Launcher.2.3.1-8.jpg


      Alternatively, you can use the following commands to add SQL Developer to the Launcher using command line.


      c=$(gsettings get com.canonical.Unity.Launcher favorites)
      d=${c//[/[\'application://Oracle-sqldeveloper.desktop\', }
      e="gsettings set com.canonical.Unity.Launcher favorites \"$d\" "
      eval $e

    9. Press Yes or No to import your previous SQL Developer settings if available.



    5      Troubleshooting

    5.1    Application Start-Up


    SQL Developer may not start for several reasons and not necessarily display any error if you start the application from the Ubuntu or Unity desktop Launcher. The following information may help you to troubleshoot the issue:

    Type  Ctrl-Alt-t  to open a terminal window and type the following:


    ls -l $(which sqldeveloper)

    echo $PATH



    Verify the output to make sure sqldeveloper can be located and has execute privileges. If this is not the case, verify that /usr/local/bin is part of your PATH environment variable. A failure most likely means SQL Developer is not installed correctly, or there is a problem with your login profile. Troubleshooting the later is however beyond the scope of this document.


    Start SQL Developer from command line to see whether it requires any user input:



    If SQL Developer prompts for the pathname of the Java JDK installation, verify the following:

    ls -l /opt/java/jdk/bin/java

    grep JAVA /usr/local/bin/sqldeveloper


    Verify that Java JDK has been installed according to the installation instructions outlined in this document. Also verify that the sqldeveloper start-up script was modified accordingly.

    SQL Developer start-up may fail showing the following: "  line 1193 ... Aborted...". This should be the case if the GNOME_DESKTOP_SESSION_ID environment variable was not unset according to the instructions. You can check the following:

    grep DESKTOP $(which sqldeveloper)


    The GNOME_DESKTOP_SESSION_ID environment variable under Ubuntu has been deprecated and needs to be unset in the sqldeveloper start-up script according to the installation instructions.



    You may receive the following error: " line 1559: /opt/java/jdk/bin/java: cannot execute binary file: Exec format error...". This error means that the Java installation does not meet the computer's system architecture. You can check the following:

    file /opt/java/jdk/bin/java

    uname -m


    Verify that you downloaded and installed the correct version of Java for your system architecture.
    If your system architecture is 32-bit (x86) you need to download Java for i585.
    If your system reports x86-64, you need to install Java for x64 (64-bit).




    5.2    SQL Developer Settings

    Your personal SQL Developer settings are stored in the in your $HOME or login directory. If personal settings do no exist, SQL Developer will simply create new default settings at application start-up.

    You can use the following commands to analyze and delete your personal SQL Developer settings:


    ls -l .sqldeveloper

    rm -rf .sqldeveloper



    6    Uninstalling

    6.1    Uninstalling SQL Developer

    1. Type  Ctrl-Alt-t  to open a terminal window and type the following to remove Oracle SQL Developer:

      sudo apt remove sqldeveloper

      When prompted for the password, type the password of your user account and press return.
    2. Right-click the SQL Developer Icon in Launcher and select Unlock from Launcher.
    3. Remove your personal SQL Developer settings (optional).

      rm -rf $HOME/.sqldeveloper


    6.2    Uninstalling Oracle Java JDK

    Note:You may remove Oracle Java JDK provided it was only used for SQL Developer.


    1. Type the following commands to remove Oracle Java JDK:

      sudo rm -rf /opt/java

      When prompted for the password, type the password of your user account and press return.




    7    Information and References


    7.1    Oracle Documentation


    The Oracle SQL Developer product documentation:

    SQL Developer Documentation ...

    SQL Developer Installation Guide ...


    New Features in Release 4:

    SQL Developer 4.0 New Features ...



    7.2    User Forum


    The OTN (Oracle Technology Network) user forum can help you to find answers to questions:

    SQL Developer (Not for general SQL/PLSQL questions) …

    Generic Linux ...

    This document supersedes Oracle SQL Developer 3.x on Linux Ubuntu 11.10 how-to