1

Using OSX Mohave 10.14

I have downloaded and installed the Application (mod date jan 11 2019) but when I try to launch it says:

SQL Developer requires a minimum of Java 8. Java 8 can be downloaded from: ......

Yet when I check the Java Control Panel it says

Your system has the recommended version of Java

Java 8 Update 201

What am I missing?

3 Answers3

2

Currently (2021) if you download JDK 1.8. from Oracle, it does not work because it install in Library/Internet Plug-in and SQLDeveloper does not support spaces in java path.

I have solved it as follows

  1. Uninstall JDK 1.8 (or remove the /Library/Internet Plug-in folder)
  2. Install openjdk 11 with brew install java11
  3. Add the path to your local sql configuration file nano ~/.sqldeveloper/20.4.1/product.conf
  4. SetJavaHome /usr/local/opt/openjdk@11
  5. Edit the package content `/Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh``
  6. Set hardcoded JAVA_HOME as
#!/bin/bash 
# Commented as no java_home tool is installed
# TMP_PATH=`/usr/libexec/java_home -F -v 1.8`
# if [ -z "$TMP_PATH" ] ; then
#   TMP_PATH=`/usr/libexec/java_home -F -v 11`
#   if [ -z "$TMP_PATH" ] ; then
#     TMP_PATH=`/usr/libexec/java_home -F -v 12`
#     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
# fi

# export JAVA_HOME=$TMP_PATH
export JAVA_HOME=/usr/local/opt/openjdk@11
```
Sourcerer
  • 1,891
  • 1
  • 19
  • 32
  • This worked for me without steps 5 & 6. I avoid editing the contents of application packages. The product.conf file is there so that you can override that setting without modifying the script in the application package. – SSteve Feb 19 '23 at 19:24
0

According to Installation Notes for SQL Developer for Mac OS X, it appears you need to install JDK. Note that JDK is a superset of JRE. JDK contains all of JRE plus tools such as the java compiler - javac. I also get the impression from the Installation Notes that you need to install JDK before installing SQL developer.

I am unfamiliar with Mac, but on Windows, I manually add the path to the JDK bin directory to the PATH environment variable. Then I enter the command

javac -version

and it gives me the JDK version which confirms for me that I have correctly installed JDK.

Abra
  • 19,142
  • 7
  • 29
  • 41
  • That worked and was able to launch the app and also install MySql JDBC driver. However when I set up Connection to a MysQL host (Linux) I get the following error: Status : Failure -Test failed: The server time zone value 'EDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. – Oliver G. Reid Feb 01 '19 at 04:32
  • Not sure how to fix that - I am managing the server with Webmin – Oliver G. Reid Feb 01 '19 at 04:35
  • I'm guessing it has something to do with [java] `System` properties that, unless explicitly set when launching the JVM, are initialized via the host operating system, i.e. Mac OS X in your case. Again, I am unfamiliar with Mac OS but I imagine it has some configuration setting for the timezone. Perhaps this is set to EDT ? – Abra Feb 01 '19 at 09:11
0

For me, I was getting "SQL Developer supports Java SE 8 and 11" and not "minimum of Java 8". I tried installing Java SE 17 to see if any recent version works, but it didn't. Then I tried Java SE 11 and it did work.

https://www.oracle.com/java/technologies/downloads/#java11-mac

Scroll down to Java SE Development Kit 11.0.14 section and install DMG installer

Isaac Zhao
  • 379
  • 2
  • 10