Bug 543405 - Javadoc error when module-info file contains javafx modules
Summary: Javadoc error when module-info file contains javafx modules
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.11   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-14 04:45 EST by Vittorio Torroni CLA
Modified: 2024-04-07 12:10 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vittorio Torroni CLA 2019-01-14 04:45:18 EST
I am using Eclipse IDE for Java Developers (Version: 2018-12 (4.10.0), Build id: 20181214-0600).
I have created a sample JavaFX modular application, following the instructions in https://openjfx.io/openjfx-docs/#IDE-Eclipse
The application compiles without problems.
I then click "Project" -> "Generate Javadoc", exclude the default package (containing the module-info file), and launch the javadoc generation, the following errors are reported in the console:
C:\Users\VTorroni\eclipse-workspace\TestJavadoc\src\module-info.java:11: error: module not found: javafx.controls
	requires javafx.controls;
	               ^
C:\Users\VTorroni\eclipse-workspace\TestJavadoc\src\module-info.java:12: error: module not found: javafx.fxml
	requires javafx.fxml;
	               ^
error: cannot access module-info
  cannot resolve modules
3 errors

If I choose to save the configuration in an The Ant file, the following file is generated:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="javadoc">
    <target name="javadoc">
        <javadoc access="private" author="true" classpath="C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.fxml.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.graphics.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.swing.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.controls.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.base.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx-swt.jar" destdir="doc" nodeprecated="true" nodeprecatedlist="true" noindex="false" nonavbar="false" notree="false" packagenames="testjavadoc" source="11" sourcepath="src" splitindex="false" use="true" version="true"/>
    </target>
</project>
Comment 1 Vittorio Torroni CLA 2019-01-14 04:46:07 EST
I have also tried to include the default package, but the result is the same
Comment 2 Jay Arthanareeswaran CLA 2019-01-17 00:10:29 EST
Looks like a case of --add-modules not being supplied to the Javadoc tool. Can you try adding the following argument to the VM options in the Javadoc wizard?

--add-modules=javafx.controls,javafx.fxml
Comment 3 Eclipse Genie CLA 2021-01-07 12:36:06 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Maurizio M Gavioli CLA 2022-04-16 07:00:55 EDT
The problem still occurs and affects any module in the module-info.java outside the Java own modules themselves, even if those modules are correctly configured in the application module path (compilation finds all the required modules).

Manually supplying the relevant --add-modules in the VM parameters is a work around, but it is far from obvious particularly for modules in local Maven or Gradle repositories.

Fixing it would be quite welcome and would help spreading the use of Javadoc's.
Comment 5 Eclipse Genie CLA 2024-04-07 12:10:48 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.