37

I downloaded the Oracle SQLDeveloper, but when I opened it, it said that it requires a minimum of Java 8 and gave me the website for the download. I went on and downloaded Java 10.0.1, but when I went back on to open SQL, it continued saying it required a minimum of Java 8.

I checked that the Java 10.0.1 had installed correctly, and I'm pretty sure it has. It shows up in System Preferences and when clicked, it opens the Java Control Panel fine.

I'm on a MacOS X El Captain 10.11.6.

Jacob van Lingen
  • 8,989
  • 7
  • 48
  • 78
R.L
  • 371
  • 1
  • 3
  • 3

17 Answers17

55

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.

9tymz
  • 3
  • 2
Adam
  • 1,887
  • 1
  • 21
  • 21
  • 1
    Yes, this is counter-intuitive. – FearlessFuture Apr 16 '19 at 22:56
  • 1
    This is the second time I faced an issue . This time I had minor java updates and SQL developer stopped working. I removed the latest version from JavaVirtualMachines folder – abhishek ringsia Oct 22 '19 at 10:24
  • 1
    I installed Java 13 and SQL Developer wasn't working. I just followed your link and installed Java 8 and then it started working. Thank you! – Mark Mar 07 '20 at 19:13
  • 1
    In case it helps someone else, Oracle updated Java JDK 11 and JDK 11.0.7 is certified with Catalina, it also works with SQL Developer!! https://www.oracle.com/tools/downloads/sqldev-v192-downloads.html – ember Jun 02 '20 at 16:24
  • 1
    this worked. I did not have to remove anything on macOs Catalina – Robert Saylor Jan 28 '21 at 13:45
22

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 export JAVA_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.

Robert Bain
  • 9,113
  • 8
  • 44
  • 63
6

For Mac users with Big Sur. (I am on 11.2.2):

Edit the following file:

/Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf 

and add the path for java 8 as follows:

SetJavaHome /Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home
hsuk
  • 6,770
  • 13
  • 50
  • 80
  • 1
    Thanks, it worked for me. Just be careful with java home. If you set a path you can use it and "jdk1.8.0_281.jdk" part most probably will be different. Use your own version while adding this path. – uğur taş May 06 '21 at 12:03
  • 1
    This worked for me using macOS Big Sur Version 11.5.2. I first verified the jdk location for existence. – Nick N Sep 20 '21 at 19:29
5

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
Community
  • 1
  • 1
Kris Rice
  • 3,300
  • 15
  • 33
  • Okay, I removed java 10 and instead installed java 8, however, the same error message is coming up saying i need java 8 and won't open – R.L Jun 16 '18 at 14:23
  • What happens if you run this snippet on the terminal ? – Kris Rice Jun 16 '18 at 14:31
  • It comes up with: 'Unable to find any JVMs matching version "1.8".' and the error message comes up again in a separate box. However, I've checked the system preferences on my Mac and it definitely says that Java 8 is installed – R.L Jun 16 '18 at 14:40
  • 1
    You installed the JRE not JDK. Get it here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html – Kris Rice Jun 16 '18 at 14:46
  • 2
    That seems to have worked! The help is really appreciated, thank you! – R.L Jun 16 '18 at 14:53
5

I have the same problem with MacOS Big Sur, Java 8. Clicking on the icon doesn't work. This command from terminal starts the application. sh /Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh This stopped working in MacOS Big Sur 11.2

Arjang
  • 731
  • 1
  • 10
  • 19
5

For my mac Big Sur version 11.1, clicking on sql developer icon does not work. The below workaround is working fine.

cd /Applications/SQLDeveloper.app/Contents/resources/sqldeveloper

zsh sqldeveloper.sh

Boney
  • 1,462
  • 1
  • 11
  • 19
4

You have to set the Java home. Please follow the steps given below.

  • find the installation directory by right-clicking the OracledataModeler icon and "Show Package Content" this will show you the installation directory on a Mac

  • Go to the (installation directoy for example ) /Users/user directory/Downloads/OracleDataModeler.app/Contents/Resources/datamodeler/datamodeler/bin

  • edit the datamodeler.conf file in the \datamodeler\datamodeler\bin directory and add SetJavaHome. (e.g. SetJavaHome /usr/lib/jdk18)

  • SetJavaHome /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home

  • Start the SQL data modeler from (installation directory) /Users/user directory/Downloads/OracleDataModeler.app/Contents/Resources/datamodeler/datamodeler.sh

Ganesa Vijayakumar
  • 2,422
  • 5
  • 28
  • 41
  • I tried Adam Wright's suggestion first and that wasn't sufficient… your tip finished the job. Thanks! – Dan Oct 18 '19 at 05:17
  • Worked for me! Thank you! For Oracle SQL Developer the path to the config is `/Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf` – deflomu Feb 06 '20 at 16:26
3

If you check the download page (http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html) it says JDK8 required. I don't think it supports Java 9 or 10. Many programs still don't.

As for the command you tried it is for Windows, there is no c:\Program Files on MacOS. It should be enough to run java -version.

You may want to check how you can run multiple Java versions, see Mac OS X and multiple Java versions. It is a bit messy, but sooner or later you will need it!

ewramner
  • 5,810
  • 2
  • 17
  • 33
3

If OpenJDK would work for you, and you are already using/willing to use Homebrew, AdoptOpenJDK works for me:

brew tap AdoptOpenJDK/openjdk
brew install adoptopenjdk8

I have not tested this thoroughly, but at the very least I am able to bring up SQL Developer 19.1.0.094, connect to a database, and run queries on it.

It did not work if I tried to use their instructions to install the "latest" version: brew cask install adoptopenjdk, as this seems to install OpenJDK 12.x as of May 2019.

There are other methods to install OpenJDK, but this was an easy one.

Aphoid
  • 351
  • 3
  • 8
  • Following this ran me into the [JavaFX problem](https://stackoverflow.com/questions/52484814/oracle-sql-developer-problem-initializing-welcome-page)... Just use [Oracle JDK 1.8](https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-install-mac-1969675.html) like other Answers here. – cellepo Jun 27 '19 at 02:44
  • This is what worked for me for both Mojave and Monterey. – sivabudh Jan 13 '22 at 05:25
2

Previously, only JDK 8 worked with Oracle SQL Developer.

But, per https://www.oracle.com/tools/downloads/sqldev-v192-downloads.html, JDK 8 or 11 are required. (there is some misleading documentation that says JDK 8 or higher, but it must be 8 or 11). Also, per Oracle, JDK 11.0.7 is certified for Mac OS Catalina.

JDK 11 certification: https://www.oracle.com/java/technologies/javase/products-doc-jdk11certconfig.html

JDK Certifications: https://www.oracle.com/java/technologies/javase-subscription/documentation.html#sysconfig

When I only had JDK 14 installed, it wouldn't run. It looked like it was going to, but wouldn't even start. You will need to give permission for it to run as it is still not an Apple approved app. (Ctrl-click, then Open, supposedly works & saves your setting, but after so many changes trying to get this to work, I can't promise).

ember
  • 365
  • 5
  • 11
1

After unzipping the mac sqldeveloper.zip file, you will find the SQLDeveloper.app file.

Copy the SQLDeveloper.app to Applications folder. Later execute the below command in terminal.

xattr -d com.apple.quarantine /Applications/SQLDeveloper.app
Sireesh Yarlagadda
  • 12,978
  • 3
  • 74
  • 76
1

Navigate to folder in macbook SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin

Find sqldeveloper file (Executable)

Click to open the sql developer, you can make an alias and keep the shortcut on desktop to run SQL developer directly.

shiv
  • 497
  • 3
  • 17
  • 1
    Thanks, this worked for me! I was facing the issue after upgrading to Big Sur. – Md. Mar 11 '21 at 17:38
0

I had the same problem, and none of the above solutions worked for me. I am running MacOS 10.14.5

Instead, I had to uninstall Java12 which I had installed via home brew, and sqlDeveloper. After uninstalling and deleting both, I installed Java8 JDK directly from the oracle website via download, and then I reinstalled sqlDeveloper. After wasting three hours trying to get this to work, this set of steps finally did the trick. I hope this helps others.

Johan
  • 199
  • 1
  • 4
0

I had the same problem on Catalina 10.15.6 with SQLDeveloper 20.2.0 but none of the solutions mentioned here solved the problem. First I had to right click the SQLDeveloper.app file and choose "Open" as opposed to just double clicking to avoid the problem where it's not an Apple-approved app.

I tried installing various versions of the JDK and none worked until I tried JDK 11.0.8 (https://www.oracle.com/java/technologies/javase-jdk11-downloads.html). Looking at Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh as mentioned by Robert Bain helped. It's clear from that script that this version of SQLDeveloper will only accept JDK version 1.8, 11, or 12.

Once I had JDK 11 installed, the install worked as expected.

Courtney
  • 231
  • 1
  • 6
0

I had the same problem on my mac. I had JDK 15 on my machine. I installed JDK 8 from here and just updated the JAVA_HOME per How to set or change the default Java (JDK) version on OS X?

Worked like a charm!

sameer_v
  • 414
  • 4
  • 11
0

Sqldeveloper works only with jre 8

A) install

brew tap AdoptOpenJDK/openjdk
brew install adoptopenjdk8

A.1) Optional - add the following to .zshrc

jdk() {
      version=$1
      unset JAVA_HOME;
      export JAVA_HOME=$(/usr/libexec/java_home -v"$version");
      java -version
}

Thanks to - Mac OS X and multiple Java versions

B) permissions

chmod +x /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper.sh

C) create a sqldeveloper.zsh as below

#!/bin/zsh
source ~/.zshrc
jdk 1.8.0_291
/Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper.sh
0

I'm using SDKMan to manage my java versions. Different conventions being used I guess.

I added this one line to the sqldeveloper.sh script.

At the bottom of the findJavaHome function, add this

APP_JAVA_HOME=$JAVA_HOME

which will use the current sdkman version of java.

findJavaHome()
{
  if [[ -f $HOME/.sqldeveloper/21.4.3/product.conf ]];
  then
    IncludeConfFile $HOME/.sqldeveloper/21.4.3/product.conf
  fi

  if [ -z "$APP_JAVA_HOME"]; then
    APP_JAVA_HOME=`/usr/libexec/java_home -F -v 1.8.0`
    if [ -z "$APP_JAVA_HOME" ] ; then
      APP_JAVA_HOME=`/usr/libexec/java_home -F -v 11`
    fi
  fi

  APP_JAVA_HOME=$JAVA_HOME
}

Now I can run that script from the command line and I don't get the error anymore.

Nick
  • 1,080
  • 10
  • 16