0

My problem is when in an open javafx project and try to run it without editing it, an error appear like this, and everything install for java FX.

enter image description here

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
ali shreef
  • 69
  • 10

1 Answers1

0

You should check whether your getClass().getResource() call actually returns a non-null value. I assume your css-file is not in the right place.

mipa
  • 10,369
  • 2
  • 16
  • 35
  • but how to solve this error . what should i use instead of this? by the way this created by eclipse by default !! – ali shreef Jun 18 '16 at 09:19
  • It is not created by Eclipse but by the e(fx)clipse plugin when you explicitly create a JavaFX-project. But anyway your example indeed looks like this default project and this should run without problems. At least it does so on my machine. Is there anything wrong with the css-file? Can you open and edit it? – mipa Jun 18 '16 at 15:34
  • my css file is empty ... i wounder what is wrong exactly ... i comment the getclass which bring css file to project and it is running , and i do not any editing to project !!!!! – ali shreef Jun 18 '16 at 21:18