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.
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!
Troubleshooting
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 –
/usr/libexec/java_home
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.
46 Comments
Updated JDK to 11 and SQL Developer to 20.4.1 – had to update .conf file, then it worked. Thank you!!
You’re welcome, thanks for sharing!
Hello,
I followed these instructions but it doesn’t work for me. I upgraded to BigSur 11.2.3 and have previously had Oracle SQL Developer 20.4.1 working fine under Catalina. Starting the app through the terminal reports no error. Also your file link to Oracle SQL Developer is broken.
Fixed the link, thanks for the heads-up!
We’re co-workers, right? Hit me up on slack.
Thanks very much. Worked on a 2019 16″ Macbook Pro running Big Sur 11.2.1
Great!