Updated December 1, 2020 – after some reports from folks having issues on Big Sur, I added some additional details around troubleshooting. 

I have ran into a few issues getting SQL Developer version X.Y.Z on my Mac Mini, and I’ve seen a few questions online today now that Big Sur is available. This usually happens as folks get new hardware or as updates are applied to their machines…something quits working.

It usually boils down to SQL Developer not being able to find and use the proper JDK. Either the JDK was removed and replaced with a JRE, or maybe you ended up with Java 9 or 10 on your machine, which won’t work at all with SQL Developer.

So the first thing I like to see is if my machine already has Java.

You can use

 java -version

…which asks Java to tell you what version it is.

Or you can ask your machine to tell you what the current Java Home is…

/usr/libexec/java_home

If you don’t like the answers you get back, you’re going to need to install Java.

Download and Install an Oracle Java 8 or 11 JDK

I hate saying ‘Java …JDK’ as the J stands for Java, but until then I guess that’s how I’ll keep saying it. Go here and get the download. If you’re worried about licensing and want to use an OpenJDK instead – that’s not supported, and it’s not necessary. Oracle products requiring Java don’t require licensing to use an Oracle JDK.

Once you’ve downloaded Java, it’s pretty simple to run the install.

JDK, JDK, JDK - not a JRE!
JDK, JDK, JDK – not a JRE!

If you need more help, here’s the docs around installing Java on a Mac.

To see if it ‘worked,’ run Java from a shell prompt.

java -version
java -version (you can tell how OLD this post is, you should be using something like Java 8 update 250, not update 25 in 2021!) 

Download and ‘Install’ the latest SQL Developer

Get the file.

Once it’s downloaded, open it.

Once it’s expanded, rename it.

Then drag it to your Applications in Finder.

You don't have to do this step, but if you don't, you'll be running SQL Developer out of the downloads folder.
You don’t have to do this step, but if you don’t, you’ll be running SQL Developer out of the downloads folder.

It’s ready to run!

Troubleshooting

Open a Terminal.

Run the /usr/libexec/java_home command.

This should return something with a ‘jdk’ in the string

I’m running Oracle JDK 14, which is an updated take on 11 – it’s not officially supported, but it’ll work.

However, I also have several Java JDK’s on my machine!

8, 12, and 14 – the 8 is officially supported.

By default SQL Developer will use the Java returned by this command, but what if that’s not the ‘right one?’

I want to tell SQLDev WHICH Java to use

CD to your home directory.

Then cd to .sqldeveloper (yes, it’d hidden.)

Then cd to the version of SQL Developer you have installed.

Latest version is 20.2

I’m working with version 20.2, so I’ll cd into the 20.2.0 folder.

There’s only one file here, product.conf. This file tells Java all of the flags we want to set for the Java Virtual Machine (JVM) – say, how much memory to allocate at the start, or at the max. If you leave the file alone, everything is commented out, and will use the defaults based on your machine specs.

That includes the JavaHome. Remember, we’re only messing with this entry in the file when you don’t like the Java returned by the aforementioned output of this command –

/usr/libexec/java_home

Don’t forget to tack on the Contents/Home bits.

Now, when you startup SQL Developer, it’ll use your specified Java Home, and whatever other JVM flags you’ve configured in the product.conf file.

Running that Java 8 home now…
Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

46 Comments

  1. Luis Flores Reply

    Okay I was getting frustrated and I am taking a intro to SQL class, I have no idea how to use terminal or all these java versions. Honestly I didnt know what I was doing and I also read that for Apple M1 macs are not supported but after following this it worked! Thank you, you just saved me from failing my class literally! lol

  2. Thank you so much for this post. It helps me a lot today after the new version of macOS Big Sur. It’s clear and everything works fine

  3. Frederik Keppens Reply

    Thanks Jeff. I only stumbled over the issue after installing Big Sur and am happy to say that your post is very clear and concise. It not only offers a solution but also makes me go “ahaaaa, that makes sense” 🙂

  4. Thank you for taking the time to post all of this info. It was very helpful to me today and I was in a very hard spot.

  5. Daniel James Reply

    FYI, I know this post is old but it came up first in my Google search. I have the latest (Java 10) installed and kept receiving the same “SQL Developer requires a minimum of Java 8” message. Note that this is unsupported at the moment, and I’m sure a soon-to-be-forthcoming release of SQL Developer will fix this, but here’s what I had to do:

    I had to edit the file /Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh and replace line two, simply changing the 9 to a 10. I did this in Terminal using vi, but if you’re not comfortable using the Unix editor, you can also do this using TextEdit:

    Select File->Open and type the full path above. When you press the forward slash, you’ll get another dialog that opens that allows you to specify the full path of the file you want to edit. Type the full path above and press enter. You’ll probably have to hit enter again, but then the file will open. You *may* see that the file is locked. To unlock the file to save it, click on the filename and then uncheck the lock option.

    As mentioned above, simply replace the ‘9’ with ’10’ on line two, save the file, and relaunch. It’s a hack, and you’ll get a warning that you’re running against an unsupported version of Java, but it will work.

    Hopefully this will save someone from frustration 🙂

    • Thanks Man, spent an hour trying to figure out why I was getting that message so this got it working for now until a supported version is released.

    • AKASH AMAN

      thanks a lot, bro…Was helpless. it worked with java version 10 atleast for the time being

  6. Cheers dude, this seems to have solved it for me (it took 500mb of space tho hehe)

  7. Hello,
    I’m running SQL Developer 14.1.3.20.78 on Mac OSX El Capitan 10.11.5, Java SDK 1.8.0_92 installed;
    The program works, but extreeeeemely slow, as in “not working”.
    When I click something, the program seems to have problems “drawing” the objects. Most of the stuff on screen isn’t displayed properly.
    Have you encountered anything like this?

    Thank you.

  8. Hi Jeff,

    You may want to add a note that for El Capitan users, they need to disable SIP first before installing Java 8.

    Aside from that, following everything you said on your blog enabled me to run SQL Developer on El Capitan.

    Thanks!

  9. I just installed SQL developer 4.1.3 and JDK 1.8. I use to be able to run SQL developer (Had version 3 something) a while ago. I ran the installer without deleting the older version. I have forgotten it was installed. I did remove all previous versions. I went online to make sure all the files were removed. I believe they were, but not 100% sure. Anyway, I can’t seem to be able to run SQL developer at all. It seems stuck on the loading screen (at about 10%). I am running Mac OS 10.10.5 (Yosemite). I tried attaching a screen shot to the comment, but it won’t attach 🙂 Do you have any insights as to why the installation is stuck?

    • Francisco Felix

      Never mind. I ended up deleting all the files from previous installs (and the current one as well) and reinstalled the latest version. Also modified the product.conf file to the actual path for the JDK virtual machine and voila! it worked. Thanks

  10. Hi Jeff,
    I have SqlDev 4.1.3 running with JDK 8u72. It opens up but never takes focus, i.e. the finder bar never says Sql Developer. And it won’t let me type anything. The mouse input works but no cursor. I

    I’ve completely uninstalled SqlDev and all of Java but always get the same thing.

    Any ideas?

    Thanks,
    Chris

    • Weird…the first and only thing comes to mind is maybe give the JVM some more memory. Take a look at the product.conf file in your $HOME/.sqldeveloper/4.1.0 directory.

      This is assuming you DID NOT take a 4.1.3 SQLDev app and extract it on of an existing SQLDev app on your mac..which you’d have to try REALLY REALLY hard to do – it happens somewhat frequently on Windows and can cause weird things like this.

  11. Hi Jeff,
    Thanks. My system is Linux(ubuntu 15.10),I am having this problem with java 7 and sql developer 4.1,

    cavadjava@Programci:~/Programs/opt/sqldeveloper$ ./sqldeveloper.sh
    Oracle SQL Developer
    Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.

    Found /usr/lib/jvm/java-7-oracle/bin/java to run this product, and the major version of this Java is 1.7.
    The mandatory minimum major version to run this product is 1.8.
    This product cannot run with this Java.

    Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/cavadjava/.sqldeveloper/4.1.0/product.conf

    Error: /bin/java not found or not a valid JDK
    Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/cavadjava/.sqldeveloper/4.1.0/product.conf

  12. I had done everything under the sun for downloading 4.1.1. I thought there was no way SQLDev was going to run on my machine but I decided to delete both Java and the SQLDev files I had on my computer and do this tutorial. I followed every line and every link and it worked great! I fixed it by downloading 4.1.0!! Thanks!

  13. Gianluca Simonini Reply

    The best way to configure java home according with java system configuration in MacOSX is to add

    SetJavaHome `/usr/libexec/java_home -v 1.8`

    in product.conf file
    Best.
    Gianluca

  14. Hi Jeff,
    Thanks. I am having this problem with java 8 and sql developer 4.1. I am not following your last step maybe because I am new to java and SQL.
    I cannot find ; ‘product.conf file in your $HOME/.sqldeveloper/4.1.0 folder and edit it’
    and when I find .conf files under ‘sqldeveloper>contents>resources>sqldeveloper>sqldeveloper>bin’
    none of them are named product.conf and i cant open any of them.

    Id appreciate some help.

    Thanks
    Emma

    • No problem Emma.

      You need to open a terminal window.

      Type
      CD

      this will take you to your $HOME directory.

      Under that directory there are several ‘hidden’ directories. You can see them with a ‘ls -a’ command. You’ll see the ‘.sqldeveloper’ folder. In Linux, you ‘hide’ directories by putting a ‘.’ in the name.

      Under that you’ll find the product.conf.

      You may be able to do this using Finder as well.

  15. Robert Dupuy Reply

    I didn’t think of rebooting, but when I got to that point in your blog, I thought that I might lazily try that – fail!

    I swear it said I had java 8, but java version didn’t show it.

    I downloaded a second time – obviously I didn’t quite go the same page at oracle – didn’ grab exactly the same file….second time was charmed, now sql developer is running.

  16. Hi how do i get the oracle database on my Mac. I have SQL developer and nit sure how i go ahead from there. I have Yosomite on my Mac.

    • Yeah, I had to search my blog to remember it too! That’s the main reason I write stuff here 🙂

Write A Comment