How to Fix SQL Developer Start-up Error on Ubuntu

sqldevicon

After my upgrade from Ubuntu 12.04 to Ubuntu 14.04 failed I was forced to re-installed Ubuntu. While rebuilding my machine I ran into a problem running Oracle SQL Developer 4.0.2. While I was in set-up mode, I also took the time to add SQL Developer to the applications list, as pictured above.

I downloaded Oracle SQL Developer 4.0.2, but it caused a Java dump when I tried to start it, despite having installed Java 7, exported JAVA_HOME, and having defined the JDK path in /home/smitchell/.sqldeveloper/4.0.0/product.conf.

SetJavaHome /usr/lib/jvm/java-7-oracle

This post in the Oracle Community about the issue recommends adding the following “unset” command to sqldeveloper.sh. That fixed the start-up crash.

#!/bin/bash
unset -v GNOME_DESKTOP_SESSION_ID
cd "`dirname $0`"/sqldeveloper/bin && bash sqldeveloper $*

I do still see a stack trace in the console, “java.net.MalformedURLException: unknown protocol: sqldev.temp,” but it doesn’t stop SQL Developer from running.

Next, to get SQL Developer to show up in Ubuntu’s Applications list, I added a desktop file for SQL Developer to the applications directory with the following content.

sudo gedit /usr/share/applications/sql-developer.desktop
[Desktop Entry]
Version=1.0
Name=SQL Developer
Comment=Oracle SQL Developer is an integrated development environment that simplifies the development and management of Oracle Database.
Exec=/home/smitchell/Applications/sqldeveloper/sqldeveloper.sh
Path=/home/smitchell/Applications/sqldeveloper/
Icon=/home/smitchell/Applications/sqldeveloper/icon.png
Terminal=false
Type=Application
Categories=Utility;Application;Development;

The result is the image at the beginning of this post. It’s not the prettiest icon in the world, but it will do.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s