#Hello! Can anybody help me?

6 messages ยท Page 1 of 1 (latest)

mild wing
#

I'm creating a JavaFx Application for a project with a friend. He created the .fxml, .css and controllers we needed, buuut... when i try to run the project (we're using gitHub and Visual Studio Code) this error appears:
Exception in Application start method
java.lang.reflect.InvocationTargetException

We're learning ๐Ÿ˜ฆ this is our start function in main:
โ€‹โ€‹โ€‹ public void start(Stage stage) throws Exception { FXMLLoader loader = new FXMLLoader(getClass().getResource("/main/resources/fxml/login.fxml")); loader.setController(new LoginController()); Parent root = loader.load(); Scene scene = new Scene(root); String css = this.getClass().getResource("/main/resources/css/login.css").toExternalForm(); scene.getStylesheets().add(css); stage.setScene(scene); stage.show(); }โ€‹โ€‹โ€‹โ€‹
โค๏ธ Thanks for taking your time

stiff oxideBOT
#

โŒ› This post has been reserved for your question.

Hey @mild wing! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

stiff oxideBOT
cunning lark
#

it shouldn't be /main/resources/...

#

but just /css/login.css