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?
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
(Note: you may find multiple files if you've installed multiple versions of SQL Developer; typically you'll want to edit the file for the most recent version of SQL Developer as indicated by the version number in the system directory, e.g. system19.4.0.354.1759
)
Linux/Mac
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
Windows
Look for a file named dtcache.xml somewhere in C:\Users(your user)\AppData\SQL Developer\systemn.n.n.n.n.n\o.ide.n.n.n.n.n.n.n
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>
If it doesn't exist, then you can simply add this to the end of the file just before </dt-cache>
:
<Item>
<Key>oracle.help.StartPageEditor:TabCheckboxState:Default</Key>
<Value class="java.lang.Boolean">false</Value>
</Item>
If you want to properly fix this error, you'll need to install JavaFX. This is slightly complicated by the fact that only some Java distributions come bundled with JavaFX.
If you're using Ubuntu, see below. Otherwise:
Find and install a distribution of Java that comes with JavaFX (make sure you install Java 11 or 8 as these are the versions supported by SQL Developer)
Using SDKMAN, install any distribution that includes fx
in the name:
$ sdk list java | egrep "8.0|11.0" | grep fx
| | 11.0.10.fx | zulu | | 11.0.10.fx-zulu
| | 8.0.282.fx | zulu | | 8.0.282.fx-zulu
| | 11.0.10.fx | librca | | 11.0.10.fx-librca
| | 8.0.282.fx | librca | | 8.0.282.fx-librca
e.g.
sdk install 11.0.10.fx-zulu
Alternatively, you can install a Java distribution with JavaFX manually
Azul Zulu: (download a JDK FX version): https://www.azul.com/downloads/zulu-community/?package=jdk-fx
Bellsoft Liberica (download a Full JDK version): https://bell-sw.com/pages/downloads/
If SQL Developer can't find Java, you may need to manually point it to the Java you installed by setting SetJavaHome
in product.conf
This will vary by operating system and Java distribution
Since this question was specifically asked for Ubuntu, here are the full steps for installing Oracle SQL Developer with JavaFX:
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/
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.
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
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.
I know this is a Linux thread, but I had the same issue on windows.
bmaupin pointed to the right correction.
My setup is that I use OpenJDK and have that set as JAVA_PATH. But if you download the correct version of Oracle SQL Developer, it brings its own Java SDK. All that needs to be done, is point to it.
_
# SetJavaHome C:\Program Files\OpenJDK8
SetJavaHome C:\Program Files\sqldeveloper\jdk
Done.
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)
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 !
Well, i had to install Oracle's Java 8 SDK manually. And SQLDeveloper executes without errors
Since i have Ubuntu installed, i went to Oracle SQL Developer download page and downloaded Other Platforms. Notice right under it has a link to the lastest Oracle 8 JDK (211) next to Installation Notes.
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.
So in /usr/lib/jvm:
sudo tar -xvzf ~/Downloads/jdk-8u211-linux-x64.tar.gz
Inform Ubuntu of installed location:
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
In local folder or user directory that executed 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/
Or if running for a first time, answer this directory /usr/lib/jvm/jdk1.8.0_211/ when it asks for a JDK.