IntelliJ IDEA Ultimate 2018.3 thinks my Java 9 Project is a Kotlin Project

前端 未结 8 1803
谎友^
谎友^ 2020-12-30 00:01

I have an IntelliJ project composing several subprojects which are all Java 9 modules. I use Maven as a build system. My project has no \"Facets\". My run configuration look

8条回答
  •  萌比男神i
    2020-12-30 00:48

    Update your module-info.java file

    requires javafx.fxml;
    requires javafx.controls;
    requires javafx.graphics;
    requires javafx.web;
    
    opens sample;
    
    opens sample.controller;
    

    It opens the package (eg. sample) which contains your Launcher file and opens package conatinsyoyr controllers and its corresponding fxml files (eg. sample.controller)

提交回复
热议问题