“未找到模块";Eclipse中生成JavaDocs时出现错误消息 [英] "Module not found" message when generating JavaDocs in Eclipse

查看:97
本文介绍了“未找到模块";Eclipse中生成JavaDocs时出现错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在应用程序中生成JavaDocs,但是当我尝试它时,会收到以下消息:

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?

我的班级文件路径如下:... \ application \ src \ game \ game.main

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

我的modulepath文件路径如下:... \ application \ src \ module-info.java

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.

这是我的module-path.java的样子:

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;
}

我设法解决了这个问题,问题是我没有正确设置Java可执行变量(JAVA_HOME,PATH_TO_FX),然后在VM的JavaDocs参数中,我必须包含-add-module 位以及我的lib文件夹在JavaFX中的位置

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

谢谢.

推荐答案

我发现暂时删除了module-info.java文件,生成了JavaDocs,然后单击undo来恢复module-info.java的工作.

I have found temporarily deleting thee module-info.java file, generating the JavaDocs then hitting undo to bring the module-info.java back works.

这是一个快速修复,但是Eclipse确实需要JavaDoc向导上的一个小按钮来禁用棉绒.

This is a quick fix, but Eclipse really needs a little button on the JavaDoc wizard to disable linting.

这篇关于“未找到模块";Eclipse中生成JavaDocs时出现错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆