Reputation: 571
I'm writing a JavaFX application with Eclipse in Linux and, using SceneBuilder, I work out a certain FXML code. When I move to windows, if I try to execute the code it runs fine but if I try to modify the fxml file it starts to give me an error (not related to the modifications). I also tried using NetBeans but nothing changed.
The error is :
javafx.fxml.LoadException: Light.Distant is not a valid type.
while the code giving error is:
<Circle fx:id="check_credit" centerX="195.0" fill="#0d6615" layoutX="8.0" layoutY="150.0" radius="8.0" stroke="TRANSPARENT" strokeLineCap="ROUND" strokeType="INSIDE">
<effect>
<Lighting bumpInput="$null">
<light>
<Light.Distant />
</light>
</Lighting>
</effect>
</Circle>
What could be the cause? Thank you in advance.
Upvotes: 3
Views: 1490
Reputation: 209694
You are missing the import from your FXML file:
<? import javafx.scene.effect.Light.Distant ?>
Upvotes: 1