3

I'm doing a Java project which involves JavaFX. I'm using Eclipse Oxygen with Java 8 (java-8-openjdk-amd64) and I installed the Eclipse plugin e(fx)clipse.

I don't understand why this project has two errors:

The project was not built since its build path is incomplete. Cannot find the class file for javafx.geometry.Point2D. Fix the build path then try building this project

and

The type javafx.geometry.Point2D cannot be resolved. It is indirectly referenced from required .class files

I searched on StackOverflow for similar problems, and tried some settings changes but nothing solved my problem.

I tried to change the access rules in the Build Path of my project: Build Path > Configure Build Path > Libraries > JRE System Library > Add a new rule

I added different rules: javafx/**, changed it to **/javafx/** but nothing changed.

This project works well in Windows, I opened it with Eclipse on Windows and everything works fine.

Do you have an idea on how to solve this problem?

EDIT: Accepted answer: $ sudo apt install openjfx

Be Chiller Too
  • 2,502
  • 2
  • 16
  • 42

1 Answers1

4

It looks like you haven't installed JavaFX. Because some parts of JavaFX are not compatible with the distributions open source licenses, it often is not part of the packages shipped by default.

If you're using Ubuntu, you can install it using sudo apt install openjfx.

For further reading have a look at JavaFX and OpenJDK.

andred
  • 1,204
  • 1
  • 17
  • 29