我正在尝试将场景构建器连接到我的主类,但此错误消息显示在编译器
中 Error: Could not find or load main class application.Main
你会如何以正确的方式做到这一点? 我做错了什么?
我对java非常新,所以有什么帮助!
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
public class Main {
@FXML
private ResourceBundle resources;
@FXML
private URL location;
@FXML
private Button bout0;
@FXML
private Button boutadd;
@FXML
private Button boutclear;
@FXML
private Button boutdec;
@FXML
private Button boutdivi;
@FXML
private Button boutegale;
@FXML
private Button boutmpty;
@FXML
private Button boutpoum;
@FXML
private Button boutpourc;
@FXML
private Button boutsous;
@FXML
void handleButtonAction(ActionEvent event) {
}
@FXML
void initialize() {
assert bout0 != null : "fx:id=\"bout0\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutadd != null : "fx:id=\"boutadd\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutclear != null : "fx:id=\"boutclear\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutdec != null : "fx:id=\"boutdec\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutdivi != null : "fx:id=\"boutdivi\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutegale != null : "fx:id=\"boutegale\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutmpty != null : "fx:id=\"boutmpty\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutpoum != null : "fx:id=\"boutpoum\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutpourc != null : "fx:id=\"boutpourc\" was not injected: check your FXML file 'Jdmd.fxml'.";
assert boutsous != null : "fx:id=\"boutsous\" was not injected: check your FXML file 'Jdmd.fxml'.";
}
}