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条回答
萌系小妹纸
2楼-- · 2020-06-07 07:27

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
查看更多
【Aperson】
3楼-- · 2020-06-07 07:35

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.

查看更多
兄弟一词,经得起流年.
4楼-- · 2020-06-07 07:38

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
查看更多
登录 后发表回答