I installed the Oracle Sql developer but I am not getting the startup page. A JavaFx error is encountered.
How can I solve this problem?
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 is now part of OpenJDK but needs to be installed separately:
sudo apt-get install openjfx
Just FYI, seems the JDK installed with 18.4 XE does not include 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)
enter image description here
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
to false
e.g.
<Value class="java.lang.Boolean">false</Value>
As of SQL Developer 19.2 (released August 2019), OpenJDK 11 is now supported.
Note: The Welcome Page does not seem to work with this solution; it shows a blank page, but the error message is gone. If you want the Welcome Page to 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
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/
As others have already said, the problem is that OpenJDK 8 (the version required by Oracle SQL Developer) doesn't include JavaFX.
There are many possible solutions. Here are a few:
Install an OpenJDK 8 distribution that comes with JavaFX, such as:
Amazon Coretto
To install using sdkman:
sdk install java 8.0.212-amzn
Azul ZuluFX
To install using sdkman:
sdk install java 8.0.202-zulufx
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.
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)
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 :
$ 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 !
Summary of a solution for Mac OS (Catalina) and SQL Developer 19.4:
ls /Library/Java/JavaVirtualMachines/
/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.
The message indicates your Java Home needs the JavaFX engine/feature/jars for this page to work.
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.
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.
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.
Or go get the jar(s) and add them to your Java Home.