11

How can I disable Unknown property: error in eclipse while writing JavaFx css properties on Eclipse Mars?

For example: Unknown property: "-fx-background-color" in -fx-background-color: #CCFF99;

Program-Me-Rev
  • 5,734
  • 16
  • 53
  • 126

2 Answers2

23

Right click on your project and go to build path > Configure build path. Under libraries, click on "Add library..." button. Add JavaFX SDK to your project. This will resolve your issue.

Add Library

Aubin
  • 14,250
  • 9
  • 61
  • 81
spdl83
  • 316
  • 3
  • 5
  • Could this be used for Maven projects? – Line Jan 26 '18 at 13:00
  • I believe the choice JavaFX SDK only becomes available if the e(fx)clipse plug-in has been installed. (Please correct me if I'm wrong.) This is available through help/EclipseMarketplace. – Phil Freihofner Jun 02 '21 at 22:18
  • 1
    @Line I am able to use this with a Java 8 Maven project, yes. I don’t believe it affects dependencies in `pom.xml`. – owengall Nov 02 '21 at 16:01
0

Not sure since I can't reproduce this issue, but do you have e(fx)clipse installed? If not, try installing it- it seems to help Eclipse to be more compatible with javaFX.

If you already have it, or if it doesn't help, try the solutions posted here, here, and here.

Community
  • 1
  • 1