“Module not found” message when generating JavaDocs in Eclipse

被刻印的时光 ゝ 提交于 2020-07-22 03:43:29

问题


I'm trying to generate JavaDocs in my application, however, when I try it, I get the following message:

...\application\src\module-info.java:5: error: module not found: javafx.base
    requires javafx.base;
                   ^
...\application\src\module-info.java:6: error: module not found: javafx.fxml
    requires javafx.fxml;
                   ^
...\application\src\module-info.java:7: error: module not found: javafx.graphics
    requires transitive javafx.graphics;
                              ^
...\application\src\module-info.java:8: error: module not found: javafx.media
    requires javafx.media;
                   ^
...\application\src\module-info.java:9: error: module not found: javafx.controls
    requires javafx.controls;
                   ^
...\application\src\module-info.java:10: error: module not found: org.junit.jupiter.api
    requires org.junit.jupiter.api;

And i'm not exactly sure what it means. I've tried googling it but didn't really find anything useful, found a very similiar question but it was never answered. What could be the issue?

My classes filepath is as follows: ...\application\src\game\game.main

My modulepath filepath is as follows:...\application\src\module-info.java

My application runs fine so i'm not really sure what the issue could be.

This is how my module-path.java looks like:

module froggerGame 
{
    exports frogger.helper;
    exports frogger.builders;
    exports tests;
    exports frogger.controllers;
    exports frogger.world;
    exports frogger.actors;
    exports frogger.game;
    requires javafx.base;
    requires javafx.controls;
    requires javafx.fxml;
    requires javafx.graphics;
    requires javafx.media;
    requires org.junit.jupiter.api;
}

EDIT: I managed to fix the issue, the problem was that I didn't set up my Java Executable Variables correctly (JAVA_HOME , PATH_TO_FX) and then in the arguments of the VM for JavaDocs, I had to include the --add-module bit as well as the location of my lib folder in JavaFX

Thanks.

来源:https://stackoverflow.com/questions/59345591/module-not-found-message-when-generating-javadocs-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!