Oracle SQLDeveloper on MacOS won't open after

2020-06-07 07:00发布

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 had also found someone recommending trying this command:

c:\Program Files\Oracle\sqlcl\17.3\sqlcl\bin>java -version

After trying this in the Terminal, I ended up with command not found.

I'm on a MacOS X El Captain 10.11.6.

9条回答
Rolldiameter
2楼-- · 2020-06-07 07:19

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!

查看更多
看我几分像从前
3楼-- · 2020-06-07 07:20

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.

查看更多
Lonely孤独者°
4楼-- · 2020-06-07 07:22

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

查看更多
对你真心纯属浪费
5楼-- · 2020-06-07 07:24

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).

查看更多
该账号已被封号
6楼-- · 2020-06-07 07:25

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)
  2. Download and install Java 8. https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

  3. Launch SQLDeveloper.

查看更多
爷的心禁止访问
7楼-- · 2020-06-07 07:25

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.

查看更多
登录 后发表回答