Issue
I am working on javafx project and I started this project my old computer then I am working on new computer same project there is no problem with my main project. I is running correctly but when I create a new project again on my new computer in eclipse then press run button, I take the below output.
{hi:9, mom:8, d:6, foo:3, ach:4, cbba:5, edf:7}
null
[hi:9]
null
[mom:8]
[d:6]
null
[foo:3 ach:4 cbba:5]
[edf:7]
I am working with Java 9 and eclipse oxygen also I do not change anything in new project, just press run.
The new project is in below.
package application;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
BorderPane root = new BorderPane();
Scene scene = new Scene(root,400,400);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
Solution
I think the output is the output from another project
so there may be no problem with your JavaFX code.
But you can simply run the program by clicking the little arrow in next to the run button and select the project that you wanted to run.
This might work.
Answered By - Jonas Fok
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.