Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle SQL Developer Problem initializing Welcome Page

I installed the Oracle Sql developer but I am not getting the startup page. A JavaFx error is encountered.

Problem Initializing JavaFx runtime

How can I solve this problem?

like image 657
Utkarsh Avatar asked Sep 24 '18 17:09

Utkarsh


People also ask

Why Oracle SQL Developer is not opening?

It's possible that your Windows jdk path isn't recognizable or missing. You should have sqldeveloper. conf file that contains a reference to your JDK directory. Find your jdk path and make sure it's reflected in your sqldeveloper.


2 Answers

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:

  1. 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

  2. Open that file in your favourite editor

  3. 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>
    

Install JavaFX

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:

  1. 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/

  2. 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

    • Linux/Ubuntu (see below)
    • macOS: see https://stackoverflow.com/a/60814843/399105
    • Windows: see https://stackoverflow.com/a/65389691/399105

Full instructions for Ubuntu

Since this question was specifically asked for Ubuntu, here are the full steps for installing Oracle SQL Developer with JavaFX:

  1. Install alien, OpenJDK 11, and OpenJFX

    sudo apt install alien openjdk-11-jdk openjfx
    
  2. Download SQL Developer >= 19.2
    https://www.oracle.com/tools/downloads/sqldev-downloads.html

    • Download the Linux RPM
  3. Install SQL Developer

    sudo alien -i sqldeveloper-*.rpm
    
  4. (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
    
  5. 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/
    
like image 90
bmaupin Avatar answered Sep 19 '22 10:09

bmaupin


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.

like image 28
thatjeffsmith Avatar answered Sep 19 '22 10:09

thatjeffsmith