Installing SQL Developer on Linux
I recently had to install SQL Developer on my Linux box at home to communicate with my R12.1.1 instance. I could have used the version that I have installed in my W2K virtual machine (I need some kind of Windows installed to use Workflow Builder, so have a VM running it), but sometimes I just need to access the database without wanting or needing to have a VM running which uses 1GB of RAM. In this post, I will detail the steps that I took to get it working.
Firstly, download the right version from Oracle here. I downloaded the file “sqldeveloper-2.1.1.64.39-no-jre.zip”
Once the program has downloaded, unzip the file into a temporary location. I unzipped mine into /home/Downloads where it created a new subdirectory called “sqldeveloper” for me.
Move the sqldeveloper folder into /opt (you may need root privileges to do this, so either do this as root or use sudo to move the folder).
Navigate to /opt/sqldeveloper and change the privileges on the sqldeveloper.sh file using chmod:
sudo chmod 755 sqldeveloper.sh
Create a new file called “sqldeveloper” in /usr/local/bin/sqldeveloper which contains the following line:
/opt/sqldeveloper/sqldeveloper.sh
Change the permissions on this new file using chmod again:
sudo chmod 755 /usr/local/bin/sqldeveloper
Finally, you can run the program just by typing “sqldeveloper” at the command prompt window. Run this now from a terminal window, and you will be prompted to confirm the location of the JDK:
Oracle SQL Developer Copyright (c) 1997, 2009, Oracle and/or its affiliates.All rights reserved. Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk
In my instance, the JVM is located at /usr/lib/jvm/java-6-sun so enter that path and SQL Developer should start. Because the path to ~/.sqldeveloper does not exist yet (it will be created the first time the program runs), you will see errors. Close SQL Developer down and run the command again – you will be prompted to enter the path a second time, which will then be saved to ~/.sqldeveloper/jdk. If you ever change the location of the JVM, you will need to modify this file or SQL Developer will fail.
The last thing that I did was to create a new shortcut in my Ubuntu menu – if you are doing this, then the icon file can be found at /opt/sqldeveloper/icon.png. Now when I click on the icon, SQL Developer starts fine:
Update 01-FEB-2011 @ 0822: Just a quick update to say that although I’ve not tested this on many Linux distros, I’ve moved away from Ubuntu to Linux Mint with no problems.




August 15th, 2011 at 10:43 am
Nice post, really interesting:)
August 23rd, 2011 at 4:11 pm
I’ve recently switched to Ubuntu and have successfully installed SQL Developer 3 on it. However, one behavior that bothers me is that the numeric keypad arrows do not move the caret. Rather, they scroll the window as if scroll lock was enabled. Has this been your experience as well? If not, how have you configured it?
Thanks!
August 23rd, 2011 at 4:17 pm
Hi,
I have exactly the same issue as you – but since I never use the arrow keys on the keypad, I’ve never noticed it!
I’m using Linux Mint, which is a variant of Ubuntu, so it’s not too surprising – I guess that there is a different keyboard mapping for the number pad arrows than the normal cursor keys…
Matt
August 23rd, 2011 at 5:43 pm
Thanks for the quick reply! Unfortunately for me, I’m dependent on them already.
I’ve tried keyboard shortcuts but when I used the keypad arrows, rather than storing “KP_UP” for example, it stores “Up”. So now, there are two keyboard shortcuts for “move caret up” and both are “Up”. It numeric keypad works perfectly then after that. The thing is, when I restart SQLDeveloper, it recognizes the double “Up” entry in the shortcuts and eliminates one. Furthermore, the “Up” that remains refers to the arrow keys, not the numeric key pad arrows. So it’s back to the default scroll lock behavior.
Really wish this could be simpler. Thanks anyway for your reply!