Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java can';在javafx项目的intellij中(在Ubuntu机器中)找不到方法setTitle()和show()_Java_Intellij Idea_Javafx - Fatal编程技术网

java can';在javafx项目的intellij中(在Ubuntu机器中)找不到方法setTitle()和show()

java can';在javafx项目的intellij中(在Ubuntu机器中)找不到方法setTitle()和show(),java,intellij-idea,javafx,Java,Intellij Idea,Javafx,当我尝试在intellij(最新版本)中运行我的第一个hellWorld项目时,它显示了我 Error:(15, 21) java: cannot find symbol symbol: method setTitle(java.lang.String) location: variable primaryStage of type @org.jetbrains.annotations.NotNull javafx.stage.Stage Error:(16, 31) java: n

当我尝试在intellij(最新版本)中运行我的第一个hellWorld项目时,它显示了我

Error:(15, 21) java: cannot find symbol
  symbol:   method setTitle(java.lang.String)
  location: variable primaryStage of type @org.jetbrains.annotations.NotNull javafx.stage.Stage
Error:(16, 31) java: no suitable constructor found for Scene(javafx.scene.Parent,int,int)
    constructor javafx.scene.Scene.Scene() is not applicable
      (actual and formal argument lists differ in length)
    constructor javafx.scene.Scene.Scene(boolean) is not applicable
      (actual and formal argument lists differ in length)
Error:(17, 21) java: cannot find symbol
  symbol:   method show()
  location: variable primaryStage of type @org.jetbrains.annotations.NotNull javafx.stage.Stage

任何有解决方案的人请帮助我我是javafx新手你好,你介意分享你的hello world项目的代码并将其编辑到你的原始帖子中吗?谢谢请确保所有必需的JAR都在类路径中。请添加您的代码,以便我们可以帮助您解决问题。如果您使用Java 11+,请注意,JavaFX库已从JDK中删除。您现在必须像其他库一样将它们作为外部依赖项添加。看见