One of the great benefits to having an application developed on the Java platform is the ability to run it on many different operating systems. While Windows may still be the corporate standard in more shops than not, geeks worldwide know that Apple’s hardware and OS (OS X) are ‘superior.’ With yesterday’s release of Mountain Lion (10.8) I figured this was a good time to do a quick write-up on how to get started with SQL Developer on your [i]Mac[Book|Mini].
But wait, where is the Java?
The Java runtime that had been included with the OS X installs is no longer available in Mountain Lion. As I understand it, even if you had installed your own version of Java, when you upgrade or install 10.8, they will go away.
So if you try to run a previously installed version of SQL Developer, you won’t get very far. Java applications don’t run very well sans Java, tsk, tsk.
So for the n00bs out there (including me), here’s your
Step-By-Step Guide for Installing Java and SQL Developer
Let’s install Java first.
Getting to the download page is your first task. I’ll make it easy for you.
Java SE Development Kit 7 Downloads
* Yes, I know we officially support 1.6 and not 1.7, but here’s a secret: 1.7 works just fine in version 3.2.20_09 of SQL Developer!
Once it’s downloaded, double-click it.
But wait! Oh no!
Open your preferences, go to the security panel, and select the unsigned software option
Now, we’re cooking with gas! Try double-clicking the download again.
It should go without a hitch. If it does, you’ll see something like this:
Make sure the ‘right’ java is setup and working.
Open a terminal, and run
java -version
If you see ANYTHING but the following…
…you may have a problem.
But this is Apple and OS X, and so it will find Java just fine.
Ok, now we can worry about downloading and installing SQL Developer.
Go here and download ‘Oracle SQL Developer for Mac OSX platforms.
Once it’s downloaded, you’ll need to extract it and run it.

I would move it out of the downloads folder to your applications folder first, but this will still work.
Wait a second…
You know it’s going to ‘work’ if you see the splash screen
But My SQL Developer is Using the Wrong JDK!?
SQL Developer will use whatever Java it can find. If you have the 1.6JDK installed as well, it might find that first. If you want to force it to use the 1.7 you just installed, all you need to do is explore the SQL Developer package, and edit the sqldeveloper-Darwin.conf file in the bin directory.
You may have noticed that Java 1.6 installs to a different directory than 1.7 on OS X.
- 1.6 – /System/Library/java/JavaVirtualMachines/1.6.0.jdk/Contents/home/
- 1.7 – /Library/java/javaVirtualMachines/1.7.0.jdk/Contents/Home/
Just update the ‘SetJavaHome’ entry to the version of Java you want SQL Developer to use when it runs.
A Few More Notes
You might be wondering why I installed Java 1.7 when we technically only support 1.6. Well, 1.7 will work, and that’s what many of our developer use internally. If you don’t like bleeding edge, feel free to follow the exact same instructions and grab JDK 6 instead.
This is one of the first work related blogs I’ve written on my home machine a la Mac. I didn’t have my trusted Windows friend SnagIt at hand, but @brentO turned me onto a free and very handy utility called ‘Skitch.’ It works, and once you forget all the normal Windows application ‘way of doing things,’ is also very intuitive. And it’s free, did I mention that? Thanks Brent!
If you don’t like that the application title has an underscore in it, e.g. ‘SQL_Developer,’ then here’s a nice post from @martinpaulnash explaining how to fix that too.










Twitter
RSS
GooglePlus
Facebook
Jul 27, 2012 @ 11:12:55
Just FYI, Shift-Command-4 on a mac will let you choose a rectangle of screen to save as an image – I typically use that for my screenshots on a mac – thought yes, if you want to edit / add to that screenshot, Skitch is awesome.
Once I decide to upgrade to OS X ML I’ll give you instructions a shot – thanks!
Jul 27, 2012 @ 11:40:41
And I used the Shift-Cmd-4 to take all the screen captures. It was just the ‘post processing’ tasks that I ended up using Skitch.
Jul 27, 2012 @ 12:09:14
I noticed that sqlplus which is available in instantclient package at OTN does not work anymore on Mac OS X 10.8. Is there any newer version that 10.2.0.4 which works?
Jul 27, 2012 @ 13:42:20
I got the 32-bit version to work. Have you tried that?
Jul 27, 2012 @ 14:05:21
I did, but I am unable to connect to any database. I always get following error:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
My tnsnames.ora has not changed.
Jul 27, 2012 @ 14:08:06
That’s not a SQL*Plus issue though, that’s SQLNET. What if you tried a direct connect instead, bypass TNSNames that is.
Do you get the same 12154 if you try to connect with SQL Developer using the TNSNames entry?
Jul 27, 2012 @ 14:18:08
I need to check syntax how to supply all the parameters to SQL*Plus without tnsnames.
It works with SQL Developer using TNSNames entry.
Jul 27, 2012 @ 14:20:27
Do a google for ‘direct connect.’ I have a blog post on how to do it here if you search.
It’s possible you have more than 1 tns file on your machine? Is your PATH env var set correctly?
Jul 27, 2012 @ 14:43:06
Direct connect works.
Environment variables seem to be correct and I had no issues with SQL*Plus on 10.6 and 10.7.
Relevant variables:
DYLD_LIBRARY_PATH=/opt/sqlplus
SQLPATH=/opt/sqlplus
TNS_ADMIN=/opt/sqlplus
tnsnames.ora is in /opt/sqlplus.
Jul 27, 2012 @ 14:46:12
I’m stumped then. You could contact Support or open a thread on our Forums. I’m just a SQL*Plus user after all.
Jul 30, 2012 @ 12:51:48
Just upgrade to ML and installed both Java 1.6 and 1.7. After modifying sqldeveloper-darwin.conf to point to the 1.7 home, the menu bar app title reads “Launcher” instead of “SQL Developer”. Obviously you didn’t run into this problem. Any thoughts?
Jul 30, 2012 @ 13:25:55
Nope, my copy does the same thing. I had been running the 1.6JDK as well, and didn’t notice the ‘Launcher’ title when I switched it over to 1.7. I’ll see what I can find out.
Jul 30, 2012 @ 13:27:59
Apparently it’s an issue with the 1.7JDK on OS X in general. We’ve got it logged, so fingers-crossed.
Aug 01, 2012 @ 02:34:19
Just upgraded to ML and installed just Java 1.7 . After all steps, I’ve noticed that when I paste (Cmd-V) text in editor, the text is pasted two times, like I’ve pressed Cmd-V two times.
Any ideea what can I do to fix this?
Aug 01, 2012 @ 10:10:52
I’m seeing the same thing. If i paste with my mouse, it works as expected. In our dev builds for the next release, it appears to be working as expected. So a fix should be available soon’ish.
Aug 01, 2012 @ 10:28:15
I’ve already downgraded to Java 1.6 and i’m waiting for the next release.
I only hope that it is soon!
Thanks for a great work!
Aug 02, 2012 @ 15:43:21
I am followed all the steps was able to launch SQL Developer perfectly well. However, I am seeing all the above mentioned problems. Seeing ‘Launcher’, it pastes twice in text editor. In addition to all that, I have observed that fonts and text type are totally screwed up, and when i run query which has more than 50 results, I am not able to scroll down in query result windows to see results after count 50.
Aug 02, 2012 @ 17:15:51
I can confirm the scroll issue, looks like it won’t let you do more than a single fetch – this is bad.
The fonts – I’m not seeing any issues? Can you take a screenshot and share it somewhere?
In the meantime, can you use the 1.6 JDK? I’ll amend my post as I don’t recommend anyone using SQL Developer on Mountain Lion with 1.7JDK as these issues are not…tolerable.
Aug 03, 2012 @ 14:45:48
Hi, I had the same problems described above with JDK 1.7 – but I can’t find a 1.6 install program for the Mac anywhere on the Oracle site.
When I ran “java -version” from terminal it seemed to install it, but I’m not confident that it’s working. My directories are all present, and I updated the .conf file, but I’m still not able to get SQL Developer to open. I suspect my java install is not quite correct.
Thanks for the post, I always find it a headache installing SQL Developer, it’s never clear what needs to be done. Your blog is a real godsend!
Aug 03, 2012 @ 15:38:24
Just do a google for Java 6 jdk, there will be a download for OS X
Aug 03, 2012 @ 16:21:15
Probably I’m just having one of those days, but when I go to the Java JDK 6 download page, I see Linux, Solaris, Windows… but no Mac. I went to all sorts of JDK archive pages too, nothing there. Even googling wider afield got me no luck. I must just be looking at the wrong thing:
http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html
(For now I’m just using 1.7 and editing my SQL in a text editor to avoid the copy problem…)
Thanks again -
Martin
Aug 06, 2012 @ 02:44:04
You can get the system to automatically get the file by opening the ‘Java Preferences’ app in /Applications/Utilities/ it will ask if you want to download the 1.6 JDK.
I also found it here:
http://support.apple.com/downloads/DL1421/en_US/JavaForMacOSX10.7.dmg
Cheers
Ben
Aug 06, 2012 @ 01:44:48
Tip for installing on Mountain Lion, just type Java in a terminal and it will prompt you to install. I did not see a 1.6 download available on Oracle for Mac either, but this will install 1.6.
http://www.dssw.co.uk/blog/2012/07/29/how-to-install-java-on-mountain-lion/
Aug 06, 2012 @ 18:45:05
Thanks for the hint about the java preferences Ben. I did find that Mac update – I wasn’t sure if it would be an issue installing a patch for Lion but it was fine. In the end, my issue turned out to be due to a small typo in Jeff’s instructions where he listed the folder location for the 1.6 JDK (when you update the .conf file). It should be (on my machine at least):
/System/Library/java/JavaVirtualMachines/1.6.0.jdk/Contents/home/
(In case the difference isn’t obvious: there needs to be a period just before “jdk”.)
Thanks again to everyone for the help.
Aug 06, 2012 @ 19:13:03
Typo fixed, thanks Martin!
Oct 01, 2012 @ 09:41:58
Jeff,
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html
gets a 404 now…
Oct 01, 2012 @ 10:10:13
Jon,
Looks like the page URL changed – that’s what I get for including it in the post
I updated the link above and here it is again
Java 1.7 JDK Downloads Page
Oct 10, 2012 @ 08:19:32
Hi,
on my mac 10.8 I installed java which was shown on the top of this page. I even installed Sql. after double clicking that sql icon nothing happens. it is not responding can any bodu help me how to solve this issue. thanks in advance
Oct 10, 2012 @ 15:50:35
Open a command prompt, try running java -version
Do you get something back?
Yes?
Then try running sql developer from the command prompt out of the bin directory. What comes back?
If previous answer is ‘No’, then you didn’t install Java correctly – or that’s my guess w/o more info.
Oct 10, 2012 @ 16:37:43
Hey when I gave java -version this message is coming in my terminal
java version “1.7.0_05″
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
Oct 10, 2012 @ 16:51:29
Good, that’s what you want to see! (Although we have a few known issues with the 1.7 JDK)
Next, try to launch sql developer from the command line – do you get anything back?
Oct 10, 2012 @ 17:08:37
when I am double clicking that sql Icon it is appearing on the taskbar as it does on mac it is popping up and down after some time when I am clicking on that icon it is saying application not responding.when I am trying to open sqldeveloper using
./sqldeveloper it is not working it is saying directory not exists
Oct 10, 2012 @ 17:17:35
not ./
Go to the bin directory. on my mac it’s
/Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin
Open a terminal, cd to that directory, then try running ./sqldeveloper
Oct 10, 2012 @ 17:35:37
it is coming like this Naveens-MacBook-Pro:bin naveen$ ./sqldeveloper
Oracle SQL Developer
Copyright (c) 1997, 2011, 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
Oct 10, 2012 @ 18:08:20
dear admin,
when I am giving this /Library/Java/JavaVirtualMachines/1.7.0.jdk path it is saying error
Oct 10, 2012 @ 18:44:20
you mean, /Library/java/javaVirtualMachines/1.7.0.jdk/Contents/Home/, right?
You need to find out where java was installed before you can continue. Use Finder to look for the jdk directory and edit the sqldeveloper-Darwin.conf file to point to it.
Nov 05, 2012 @ 01:21:16
Thanks for the helpful instructions. I also ran into the “double clicking that sql icon nothing happens” issues.
I was however able to find a bit more information: activity monitor showed as bash process running at 100% for one cpu, inspecting this process showed SQL Developer.app as the parent process.
$java -version
java version “1.6.0_33″
Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
$ cd /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin
$ ./sqldeveloper
Oracle SQL Developer
Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
Registered TimesTen
Resulting in a splash screen, and the application launching. So not sure why the SqlDeveloper.app refuses to function, but running from the bin directory works.
Dec 15, 2012 @ 13:02:18
hey jeff . i read your blog almost twice a day..really gr8 ..
. i have a lot of work pending .
i have macbook pro (os : mountain lion)and just have just installed sql developer and somehow i installed it correctly by reading ur article (here) but when i make a connection it gives me an error . i have tried alot to do something but i guess nothing is on my way ..please please do help me
my error:
STATUS :FAILURE -TEST FAILED :IO ERROR :THE NETWORK ADAPTER COULD NOT ESTABLISH THE CONNECTION.
Dec 15, 2012 @ 13:15:14
Where is the database you’re trying to connect to? The error indicates that your machine can’t reach it on the network. Can you ping the server name or IP address you used in your connection properties?
Twice a day? I’m extremely humbled to know that you’re getting enough value to merit so many visits! Thanks for sharing that and making my day
Now let’s get your connection problem fixed!
Mar 03, 2013 @ 13:16:32
i think i need to download oracle 10g database like we do on windows ..
cuz i dont have any for mac os X .. i dont understand jeff which database u are talking about .
in windows its a lot easier but when it come to mac ..things start to end up badly.
can u please tell me what all i need to install on my mac .i think i;m missing something. i dont have a database on my mac i have it on my windows desktop and even oracle doesnot provide downloads for mac’s
so what should i do jeff!
try to solve me out
Regards
Mar 04, 2013 @ 07:56:56
SQL Developer is just the client – it can run pretty much anywhere. You’ll need a database to connect to, but that’s the subject of a different post. Most of us run VirtualBox VMs to get Oracle Database on a Mac, running XE or EE on a Linux virtual environment.
Jan 05, 2013 @ 11:25:12
These instructions didn’t work for me. I had to add the line “/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home” to $HOME/.sqldeveloper/jdk
Adjust this line to match your machine’s location of Java.
Jan 08, 2013 @ 21:32:28
Guys, I was also having issues running it from the icon, but I was able to run it from terminal. After that I added the SQL icon into the JavaVirtualMachines folder, copied to my desktop and now I can just launch from there without using terminal.
Feb 12, 2013 @ 00:08:01
i can’t edit SetJavaHome /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
I find it through opening it with textwrangler but when i try to edit it, it says “save the file to be able to edit it since darwin file is not on the disk. but your edits won’t alter the file.”
what can i do?
thanks