Oracle SQL Developer 初始化欢迎页面时出现问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52484814/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle SQL Developer Problem initializing Welcome Page
提问by Utkarsh
采纳答案by thatjeffsmith
The message indicates your Java Home needs the JavaFX engine/feature/jars for this page to work.
该消息表明您的 Java Home 需要 JavaFX 引擎/功能/jars 才能运行此页面。
We have several pages that use Java FX to render visualizations - the Welcome Page, Instance Viewer, and Real Time SQL Monitoring are the big ones.
我们有几个页面使用 Java FX 来呈现可视化——欢迎页面、实例查看器和实时 SQL 监控是最大的页面。
Make sure you have running Oracle Java 8 JDK. I'm guessing you're running Open JDK - which we technically don't support, but it probably will work.
确保您已运行 Oracle Java 8 JDK。我猜你正在运行 Open JDK - 我们技术上不支持它,但它可能会工作。
Note: as an Oracle product requiring Java, you are allowed to use the Oracle JDK (v8 today or v11 when we introduce support later this Summer) at no additional cost.
注意:作为需要 Java 的 Oracle 产品,您可以免费使用 Oracle JDK(今天的 v8 或我们今年夏天晚些时候推出支持时的 v11)。
Or go get the jar(s) and add them to your Java Home.
或者去获取 jar(s) 并将它们添加到您的 Java Home。
回答by bmaupin
Manual hack
手动破解
If you don't care about the welcome page and just want to get rid of the error, you may be able to prevent the welcome page from showing on startup:
如果您不关心欢迎页面而只想摆脱错误,您可以阻止欢迎页面在启动时显示:
Find the file containing the setting to show the welcome page on startup
find ~/.sqldeveloper/ -name dtcache.xml
e.g.
$ find ~/.sqldeveloper/ -name dtcache.xml /home/user/.sqldeveloper/system19.4.0.354.1759/o.ide.13.0.0.1.42.190403.1502/dtcache.xml
Open that file in your favourite editor
Look for this line:
<Key>oracle.help.StartPageEditor:TabCheckboxState:Default</Key>
Just below that line, change the value from
true
tofalse
e.g.
<Value class="java.lang.Boolean">false</Value>
找到包含设置的文件以在启动时显示欢迎页面
find ~/.sqldeveloper/ -name dtcache.xml
例如
$ find ~/.sqldeveloper/ -name dtcache.xml /home/user/.sqldeveloper/system19.4.0.354.1759/o.ide.13.0.0.1.42.190403.1502/dtcache.xml
在您喜欢的编辑器中打开该文件
寻找这一行:
<Key>oracle.help.StartPageEditor:TabCheckboxState:Default</Key>
就在该行下方,将值从 更改
true
为false
例如
<Value class="java.lang.Boolean">false</Value>
Use OpenJDK
使用 OpenJDK
As of SQL Developer 19.2 (released August 2019), OpenJDK 11 is now supported.
从 SQL Developer 19.2(2019 年 8 月发布)开始,现在支持 OpenJDK 11。
Note: The Welcome Pagedoes not seem to work with this solution; it shows a blank page, but the error message is gone. If you want the Welcome Pageto work see my previous answer below.
注意:欢迎页面似乎不适用于此解决方案;它显示一个空白页,但错误消息消失了。如果您希望欢迎页面正常工作,请参阅下面我之前的回答。
Here's how to install or upgrade:
以下是安装或升级的方法:
Install alien, OpenJDK 11, and OpenJFX
sudo apt install alien openjdk-11-jdk openjfx
Download SQL Developer >= 19.2
https://www.oracle.com/tools/downloads/sqldev-downloads.html- Download the Linux RPM
Install SQL Developer
sudo alien -i sqldeveloper-*.rpm
(Optional) Create a desktop entry
echo "[Desktop Entry] Type=Application Name=Oracle SQL Developer Exec=sqldeveloper Icon=/opt/sqldeveloper/icon.png Terminal=false" >> ~/.local/share/applications/sqldeveloper.desktop
Open SQL developer in the terminal to set the path to the JDK
$ /usr/local/bin/sqldeveloper Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/user/.sqldeveloper/19.4.0/product.conf /usr/lib/jvm/java-11-openjdk-amd64/
安装外星人、OpenJDK 11 和 OpenJFX
sudo apt install alien openjdk-11-jdk openjfx
下载 SQL Developer >= 19.2
https://www.oracle.com/tools/downloads/sqldev-downloads.html- 下载Linux RPM
安装 SQL Developer
sudo alien -i sqldeveloper-*.rpm
(可选)创建桌面条目
echo "[Desktop Entry] Type=Application Name=Oracle SQL Developer Exec=sqldeveloper Icon=/opt/sqldeveloper/icon.png Terminal=false" >> ~/.local/share/applications/sqldeveloper.desktop
在终端打开SQL developer设置JDK的路径
$ /usr/local/bin/sqldeveloper Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/user/.sqldeveloper/19.4.0/product.conf /usr/lib/jvm/java-11-openjdk-amd64/
Previous answer
上一个答案
As others have already said, the problem is that OpenJDK 8 (the version required by Oracle SQL Developer) doesn't include JavaFX.
正如其他人已经说过的,问题在于 OpenJDK 8(Oracle SQL Developer 所需的版本)不包含 JavaFX。
There are many possible solutions. Here are a few:
有许多可能的解决方案。这里有一些:
Install an OpenJDK 8 distribution that comes with JavaFX, such as:
On Ubuntu, you can keep your existing OpenJDK and just install the JavaFX libraries:
Install version 8 of the JavaFX libraries
sudo apt install libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx=8u161-b12-1ubuntu2
Put the JavaFX packages on hold (otherwise they will get upgraded to v11)
sudo apt-mark hold libopenjfx-java libopenjfx-jni openjfx
Install Oracle Java 8
I intentionally put this last because Oracle no longer provides free updates to Java 8, so you won't get the latest security patches if you install Oracle Java 8.
安装 JavaFX 附带的 OpenJDK 8 发行版,例如:
在 Ubuntu 上,您可以保留现有的 OpenJDK 并安装 JavaFX 库:
安装 JavaFX 库的第 8 版
sudo apt install libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx=8u161-b12-1ubuntu2
暂停 JavaFX 包(否则它们将升级到 v11)
sudo apt-mark hold libopenjfx-java libopenjfx-jni openjfx
安装 Oracle Java 8
我有意将其放在最后,因为Oracle 不再提供 Java 8 的免费更新,因此如果您安装 Oracle Java 8,您将不会获得最新的安全补丁。
回答by David Easley
If you're using OpenJDK there's no need to switch to Oracle JDK (or shoe-horn Oracle's Java FX jars into your OpenJDK installation as has been suggested above); Java FX isnow part of OpenJDK but needs to be installed separately:
如果您使用的是 OpenJDK,则无需切换到 Oracle JDK(或将 Oracle 的 Java FX jar 硬塞到您的 OpenJDK 安装中,如上所述);Java的FX是现在的OpenJDK的一部分,但需要单独安装:
sudo apt-get install openjfx
回答by tr4ck3ur
For those that get recent upgrade to java 11 as default jre and get an application that don't work with it (still need java 8) I just find that you still can downgrade openjfx (that's works for SQL Developper in my case)
对于那些最近升级到默认 jre 的 java 11 并获得无法使用它的应用程序(仍然需要 java 8)的人,我发现您仍然可以降级 openjfx(在我的情况下,这适用于 SQL Developper)
sudo apt install libopenjfx-java=8u161-b12-1ubuntu2
sudo apt install libopenjfx-jni=8u161-b12-1ubuntu2
sudo apt install openjfx=8u161-b12-1ubuntu2
Then. check that you have the OpenJFX 8 :
然后。检查您是否拥有 OpenJFX 8:
$ dpkg -l | grep openjfx
ii libopenjfx-java 8u161-b12-1ubuntu2 all JavaFX/OpenJFX 8 - Rich client application platform for Java (Java libraries)
ii libopenjfx-jni 8u161-b12-1ubuntu2 amd64 JavaFX/OpenJFX 8 - Rich client application platform for Java (native libraries)
ii openjfx 8u161-b12-1ubuntu2 amd64 JavaFX/OpenJFX 8 - Rich client application platform for Java
I hope that helps !
我希望有帮助!
回答by John Thomas
Just FYI, seems the JDK installed with 18.4 XE does not include JavaFX.
仅供参考,似乎与 18.4 XE 一起安装的 JDK 不包括 JavaFX。
[oracle@localhost ~]$ which java
/opt/oracle/product/18c/dbhomeXE/jdk/bin/java
[oracle@localhost ~]$ java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
回答by Hinotori
Well, i had to install Oracle's Java 8 SDK manually. And SQLDeveloper executes without errors
好吧,我不得不手动安装 Oracle 的 Java 8 SDK。并且 SQLDeveloper 执行没有错误
Since i have Ubuntu installed, i went to Oracle SQL Developer download pageand downloaded Other Platforms. Notice right under it has a link to the lastest Oracle 8 JDK(211) next to Installation Notes.
由于我安装了 Ubuntu,我转到Oracle SQL Developer 下载页面并下载了其他平台。请注意,在其下方有一个指向最新 Oracle 8 JDK(211)的链接,位于安装说明旁边。
You can follow here, but this is for a full install of Oracle's Java 8 JDK and i want only SQL Developer pointing to it. In sudo update-alternatives --config java
i still have openjdk installed with no problems.
您可以按照此处操作,但这是完整安装 Oracle 的 Java 8 JDK,我只希望 SQL Developer 指向它。在sudo update-alternatives --config java
我仍然有OpenJDK的安装,没有任何问题。
So in /usr/lib/jvm:
所以在 /usr/lib/jvm 中:
sudo tar -xvzf ~/Downloads/jdk-8u211-linux-x64.tar.gz
Inform Ubuntu of installed location:
通知 Ubuntu 安装位置:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_211/bin/java" 0
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_211/bin/javac" 0
Check with sudo update-alternatives --config java
检查 sudo update-alternatives --config java
In local folder or user directory that executed sqldeveloper.sh:
在执行 sqldeveloper.sh 的本地文件夹或用户目录中:
nano/vi/vim/emacs /home/user/.sqldeveloper/19.1.0/product.conf
update the line SetJavaHome /usr/lib/jvm/someOpenJDKInstallation
to SetJavaHome /usr/lib/jvm/jdk1.8.0_211/
将行更新SetJavaHome /usr/lib/jvm/someOpenJDKInstallation
为SetJavaHome /usr/lib/jvm/jdk1.8.0_211/
Or if running for a first time, answer this directory /usr/lib/jvm/jdk1.8.0_211/ when it asks for a JDK.
或者如果是第一次运行,当它要求 JDK 时回答这个目录 /usr/lib/jvm/jdk1.8.0_211/。
回答by arno77
Summary of a solution for Mac OS (Catalina) and SQL Developer 19.4:
Mac OS (Catalina) 和 SQL Developer 19.4 的解决方案摘要:
- Check installed java versions on Mac:
ls /Library/Java/JavaVirtualMachines/
- Ensure you have 8 or 11 java version installed, must be official java from Oracle - openjdk doesn't include JavaFX
- Check the correct path for e.g. version 11, run this command in terminal:
/usr/libexec/java_home -F -v 11
- Copy the path, e.g.
/Library/Java/JavaVirtualMachines/jdk11.0.6.jdk/Contents/Home
- Edit in user home dir the file
~/.sqldeveloper/19.4.0/product.conf
:SetJavaHome /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/Contents/Home
- 在 Mac 上检查已安装的 Java 版本:
ls /Library/Java/JavaVirtualMachines/
- 确保您安装了 8 或 11 java 版本,必须是 Oracle 的官方 java - openjdk 不包括 JavaFX
- 检查例如版本 11 的正确路径,在终端中运行此命令:
/usr/libexec/java_home -F -v 11
- 复制路径,例如
/Library/Java/JavaVirtualMachines/jdk11.0.6.jdk/Contents/Home
- 在用户主目录中编辑文件
~/.sqldeveloper/19.4.0/product.conf
:SetJavaHome /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/Contents/Home
This worked for me.
这对我有用。