Java4Kids_code icon indicating copy to clipboard operation
Java4Kids_code copied to clipboard

JavaFX "Location is required" runtime exception

Open cfierbin opened this issue 10 years ago • 1 comments

Hello Yakov, I imported the TicTacToe module into IntelliJ IDEA 14.0.2. I get a runtime exception in Application start method, caused by java.lang.NullPointerException: Location is required. It looks like FXMLLoader.load(getClass().getResource("tictactoe.fxml") returns null, although the FXML file is located in the same directory as the application. I have the same problem with the Calculator from Chapter 7. Best regards, Cristina

cfierbin avatar Dec 16 '14 19:12 cfierbin

Please see if the answer to this question helps:

http://stackoverflow.com/questions/22000423/javafx-and-maven-nullpointerexception-location-is-required

On Tue, Dec 16, 2014 at 2:50 PM, Cristina Fierbinteanu < [email protected]> wrote:

Hello Yakov, I imported the TicTacToe module into IntelliJ IDEA 14.0.2. I get a runtime exception in Application start method, caused by java.lang.NullPointerException: Location is required. It looks like FXMLLoader.load(getClass().getResource("tictactoe.fxml") returns null, although the FXML file is located in the same directory as the application. I have the same problem with the Calculator from Chapter 7. Best regards, Cristina

— Reply to this email directly or view it on GitHub https://github.com/yfain/Java4Kids_NoStarchPress_code/issues/1.

yfain avatar Dec 16 '14 19:12 yfain