How to install SQL Developer on Ubuntu 14.04?

I am trying to install SQL Developer on Ubuntu 14.04. I have followed some tutorials but none of them worked. So I am asking you if you know how to install SQL Developer.


Solution 1:

I installed SQL Developer with these steps:

  1. (See the comments—this might not be necessary)
    Download and re-install newest Ubuntu 14.04 LTS from Ubuntu website.

  2. Install Java:

    • Java Version JDK 7:

      sudo apt-get install openjdk-7-jdk openjdk-7-jre icedtea-7-plugin
      sudo update-alternatives --config java
      
    • Java Version JDK 8 (in some installations this is a requirement instead of 1.7):

      sudo add-apt-repository ppa:webupd8team/java
      sudo apt-get update
      sudo apt-get install oracle-java8-installer
      sudo update-alternatives --config java
      
  3. Download SQL Developer from Oracle website (I chose Other Platforms download).

  4. Extract file to /opt:

    sudo unzip sqldeveloper-*-no-jre.zip -d /opt/
    sudo chmod +x /opt/sqldeveloper/sqldeveloper.sh
    
  5. Linking over an in-path launcher for Oracle SQL Developer:

    sudo ln -s /opt/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper
    
  6. Edit /opt/sqldeveloper/sqldeveloper.sh and replace it's content to:

    #!/bin/bash
    unset -v GNOME_DESKTOP_SESSION_ID
    cd /opt/sqldeveloper/sqldeveloper/bin
    ./sqldeveloper "$@"
    

    or (to prevent error: ./sqldeveloper: Permission denied)

    #!/bin/bash
    unset -v GNOME_DESKTOP_SESSION_ID
    cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $*
    
  7. Run SQL Developer:

    sqldeveloper
    

    Note: When you run Sql Developer at the first time, you need to specify the path of JDK's folder. In my computer, JDK stored at /usr/lib/jvm/java-1.7.0-openjdk-amd64 For Java 8 and Ubuntu 16+ /usr/lib/jvm/java-8-oracle

  8. Finally, create desktop application for easy to use:

    cd /usr/share/applications/
    sudo vim sqldeveloper.desktop
    

    add this lines:

    [Desktop Entry]
    Exec=sqldeveloper
    Terminal=false
    StartupNotify=true
    Categories=GNOME;Oracle;
    Type=Application
    Icon=/opt/sqldeveloper/icon.png
    Name=Oracle SQL Developer
    

    then type:

    sudo update-desktop-database
    

Solution 2:

Here's how I did it on Ubuntu, I think this is the easiest way and will give you a package that you can easily reuse later (but you can't redistribute according to OTN license):

  1. Downlod the sql developer package from here.
  2. Install the sql developer package as the following.

    sudo apt-get install sqldeveloper-package debhelper openjdk-7-jdk openjdk-7-jre icedtea-7-plugin
    
  3. Now all what you need to do is to run the command (you might have a different version)

    make-sqldeveloper-package sqldeveloper-4.1.3.20.78-no-jre.zip
    
  4. This will generate a debian package that you can use to install sql developer.
  5. Now install the resulting .deb package using the command (Your deb might have a different version too):

    sudo dpkg -i sqldeveloper_4.1.3.20.78+0.2.4-1_all.deb
    
  6. You're now done with the installation. in my case it needed the new java 8 then you will need to run the following commands.

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update 
    sudo apt-get install oracle-java8-installer
    
  7. Finally you need to provide the java path for oracle sql developer at the first run in my case it was at /usr/lib/jvm/default-java/.

Solution 3:

  1. Install Java 6. (It didn't work for me with Java 1.7):

    sudo add-apt-repository ppa:webupd8team/java  
    sudo apt-get update  
    sudo apt-get install oracle-java6-installer  
    
  2. Download the SQL Developer from here and choose Other platforms. (You'll need an account in order to download it). Open the Downloads directory:

    cd ~/Downloads
    

    and extract the file to /opt:

    sudo unzip sqldeveloper-*-no-jre.zip -d /opt/  
    
  3. Make the launch script executable:

    sudo chmod +x /opt/sqldeveloper/sqldeveloper.sh
    
  4. Open sqldeveloper:

    sudo /opt/sqldeveloper/sqldeveloper.sh
    

    The first time you'll be asked to enter the jvm location. In my case (and probably yours if you have followed the first step), the location is: /usr/lib/jvm/java-6-oracle .

Solution 4:

I installed oracle sqldeveloper in ubuntu 17.10 using the following method:

  1. Accept license agreement and download oracle linux rpm: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
  2. Install alien:

    sudo apt-get install alien

  3. Install the rpm using alien:

    sudo alien -i sqldeveloper-17.3.1.279.0537-1.noarch.rpm

  4. Run sql developer by using the following command in the terminal

    sqldeveloper

Make sure to change the version of your rpm. For this to be successful you have to have oracle java 8 or above installed in your machine.

Solution 5:

I installed version 17.4 on Ubuntu 16.04 GNOME like so.

  1. Verify installation of OpenJDK 8 and location at /usr/lib/jvm/java-8-openjdk-amd64 If absent, install with sudo apt install openjdk-8-jdk. Newer versions of Java may work as well.
  2. Accept license agreement and download "Other Platforms" version
  3. Unzip in my home directory
  4. Run from the commandline ~/sqldeveloper/sqldeveloper.sh once to add location of Java. Enter /usr/lib/jvm/java-8-openjdk-amd64
  5. Create the desktop icon for future access from my GUI menu.

    # /home/USERNAME/.local/share/applications/sqldeveloper.desktop
    [Desktop Entry]
    Name=Oracle SQL Developer
    GenericName=SQL Developer
    X-GNOME-FullName=Oracle SQL Developer
    Comment= A free integrated development environment that simplifies the development and management of Oracle Database
    Keywords=sql;developer;oracle;db;database
    Exec=/home/USERNAME/sqldeveloper/sqldeveloper.sh
    Terminal=false
    Type=Application
    StartupNotify=true
    Icon=/home/USERNAME/sqldeveloper/icon.png
    Categories=Admin
    X-AppStream-Ignore=true
    

Make the desktop file executable

chmod +x /home/USERNAME/.local/share/applications/sqldeveloper.desktop