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 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:
oracle.help.StartPageEditor:TabCheckboxState:Default
Just below that line, change the value from true
to false
e.g.
false
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.