JDK-8297270 : API docs for javafx.swt module is not built
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: 9,openjfx11
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-11-18
  • Updated: 2022-11-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
API docs for javafx.swt module is not built since JDK-8151565.

See https://github.com/openjdk/jfx/blob/e3e0dfdb1b945844691c79e512dbae285027ff6c/build.gradle#L4127 .

If javadoc task is executed after removing the comment, it fails with below error.

> Task :javadoc
C:\Xtra\Repositories\jfx\modules\javafx.swt\src\main\java\javafx\embed\swt\CustomTransfer.java:26: error: not in a module on the module source path
package javafx.embed.swt;
^
C:\Xtra\Repositories\jfx\modules\javafx.swt\src\main\java\javafx\embed\swt\FXCanvas.java:26: error: not in a module on the module source path
package javafx.embed.swt;
^
C:\Xtra\Repositories\jfx\modules\javafx.swt\src\main\java\javafx\embed\swt\SWTCursors.java:26: error: not in a module on the module source path
package javafx.embed.swt;
^
C:\Xtra\Repositories\jfx\modules\javafx.swt\src\main\java\javafx\embed\swt\SWTEvents.java:26: error: not in a module on the module source path
package javafx.embed.swt;
^
C:\Xtra\Repositories\jfx\modules\javafx.swt\src\main\java\javafx\embed\swt\SWTFXUtils.java:26: error: not in a module on the module source path
package javafx.embed.swt;
^
5 errors
Comments
This one is a bit tricky. In addition to whatever build changes would be needed to generate the docs at all, there is the question of how they should be presented. javafx.swt is necessarily an automatic module, not an explicit one, so there is no module-info.java. If there were a way to generate the docs so that they are shown in a javafx.swt module (and not as a package in the unnamed module), then that might work. If we are able to do this, the package docs (since there is no module-info.java to provide module docs) for javafx.embed.swt would need to document the fact that that javafx.swt is an automatic module, and as such, needs to be added explicitly at runtime (using --add-modules), and that the SWT jar file needs to be added to the classpath.
18-11-2022