Oracle SQL Developer Problem initializing Welcome Page

后端 未结 8 1986
误落风尘
误落风尘 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: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:

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

      e.g.

      false
      

    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.

提交回复
热议问题