[java] JavaFX "Location is required." even though it is in the same package

I have found all of the above solutions work just fine because they trigger your IDE to rebuild the project. No magic involved.

The "real" solution for this issue is that you should just ditch your previous build directory.

  • If you are using Maven, just delete the target folder (or do a mvn clean)!
  • If you're using ANT, delete that respective folder (I think it's called out)!
  • If you're using Gradle, delete the build folder!