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;

2 Answers 2

24

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

Sign up to request clarification or add additional context in comments.

4 Comments

Could this be used for Maven projects?
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.
@Line I am able to use this with a Java 8 Maven project, yes. I don’t believe it affects dependencies in pom.xml.
How to do this for maven projects without importing any library?
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.