Oracle SQL Developer Problem initializing Welcome Page

后端 未结 8 1984
误落风尘
误落风尘 2021-02-13 05:14

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?

相关标签:
8条回答
  • 2021-02-13 05:40

    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
    
    0 讨论(0)
  • 2021-02-13 05:44

    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

    0 讨论(0)
  • 2021-02-13 05:45

    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

      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
      
    2. Open that file in your favourite editor

    3. Look for this line:

      <Key>oracle.help.StartPageEditor:TabCheckboxState:Default</Key>
      
    4. Just below that line, change the value from true to false

      e.g.

      <Value class="java.lang.Boolean">false</Value>
      

    Use OpenJDK

    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:

    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/
      

    Previous answer

    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:

      1. Install version 8 of the JavaFX libraries

        sudo apt install libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx=8u161-b12-1ubuntu2
        
      2. 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.

    0 讨论(0)
  • 2021-02-13 05:46

    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 !

    0 讨论(0)
  • 2021-02-13 05:51

    Summary of a solution for Mac OS (Catalina) and SQL Developer 19.4:

    1. Check installed java versions on Mac: ls /Library/Java/JavaVirtualMachines/
    2. Ensure you have 8 or 11 java version installed, must be official java from Oracle - openjdk doesn't include JavaFX
    3. Check the correct path for e.g. version 11, run this command in terminal: /usr/libexec/java_home -F -v 11
    4. Copy the path, e.g. /Library/Java/JavaVirtualMachines/jdk11.0.6.jdk/Contents/Home
    5. Edit in user home dir the file ~/.sqldeveloper/19.4.0/product.conf : SetJavaHome /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/Contents/Home

    This worked for me.

    0 讨论(0)
  • 2021-02-13 05:52

    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.

    0 讨论(0)
提交回复
热议问题