skip to Main Content

I’m using Ubuntu 20.04 OS. I got

package javafx.application does not exist

error.I read all articles related to topic. I both set my default Java version 8 and also add the openjfx to the Intellij as module and library. Even if I tried solutions I found, still my problem doesn’t solved. May it be related to something else that I didn’t consider? Which other things I should also check?

Thanks a lot.

2

Answers


  1. Chosen as BEST ANSWER

    Downloading jfxrt.jar file from a github repo, and placing this file inside the necessary path, which is /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext solves the problem :)

    (For Ubuntu 20.04, and Java 8)


  2. If you are working with Java 8, the easiest thing to do (and what I recommend), is to use Oracle JDK 8, not OpenJDK.

    Most OpenJDK distributions do not include JavaFX, but Oracle JDK 8 does.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search