Oracle SQLDeveloper on MacOS won't open after installation of correct Java Oracle SQLDeveloper on MacOS won't open after installation of correct Java oracle oracle

Oracle SQLDeveloper on MacOS won't open after installation of correct Java


The post above is right: SQLDeveloper only runs under Java 8.

This is counter-intuitive as other programs runs under at least X version of a software (not only X version). I kept downloading Java 11 with no luck.

After 1 failed attempt a month ago and two hours of searching today, I found this easy fix worked for me.

Solution

  1. Delete the following Java files and folders on your mac.
  • /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
  • /Library/Java/JavaVirtualMachines/(delete current java folder)

1.1 Remove the plugin:sudo rm -rf "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/"Alternatively, If sudo rm -rf makes you as uncomfortable as it should you can also:"Go to the folder" with (Command + Shift = G) and move it to the trash.

  1. Download and install Java 8.https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

  2. Launch SQLDeveloper.


Working solution for Mac running macOS Catalina 10.12.5 with openjdk 11 and SQLDeveloper 19.4.0.354:

Edit /Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh:

  1. Delete all the code before export JAVA_HOME=$TMP_PATH
  2. Change export JAVA_HOME=$TMP_PATH to exportJAVA_HOME=<path_to_jdk>/jdk-11.jdk/Contents/Home
  3. Start SQLDeveloper

If macOS complains about the files being downloaded from the internet call xattr -d com.apple.quarantine <filename>.

Incidentally I saw /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/jdk.conf has instructions for setting the java home by uncommenting and specifying SetJavaHome but that didn't work for me.


SQL Developer runs this which checks for java 9 then 8. We don't yet support (lack of a ton of testing) java 10. You went to new for us. Back up to 8 or 9 and should be fine.

We use /usr/libexec/java_home which allows us to specify which version of java we'd like to run. So even if you have N javas installed, it should return the highest one that was passed in with flags.

   #!/bin/bash               ##### THIS IS CHECKING FOR JAVA 9 #####   TMP_PATH=`/usr/libexec/java_home -F -v 9`   if [ -z "$TMP_PATH" ] ; then              ##### THIS IS CHECKING FOR JAVA 8 #####     TMP_PATH=`/usr/libexec/java_home -F -v 1.8`     if [ -z "$TMP_PATH" ] ; then       osascript -e 'tell app "System Events" to display dialog "SQL Developer requires a     minimum of Java 8. \nJava 8 can be downloaded from:\n http://www.oracle.com/technetwork    /java/javase/downloads/"'       exit 1     fi   fi