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
…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…
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.
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.
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.
It’s ready to run!
Open a Terminal.
Run the /usr/libexec/java_home command.
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!
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.
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 –
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.