当我运行应用程序时,输出如下:
Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\Users\HP\IdeaProjects\HelloWorldFX\out\production\HelloWorldFX
Caused by: java.lang.module.InvalidModuleDescriptorException: FirstWindow.class found in top-level directory (unnamed package not allowed in module)
我已经下载并安装了javaFX,但仍然没有得到输出
public class FirstWindow extends Application {
@Override
public void start(Stage primaryStage) {
Scene scene = new Scene(new Button("OK"),300,300);
primaryStage.setScene(scene);
primaryStage.setTitle("First Window!!");
primaryStage.show();
}
public static void main (String[] args){
Application.launch(args);
}
}
我期望发生的是一个窗口 有人可以帮我解决这个问题吗?