Skip to content
Advertisement

How to setup web url for JavaFX documentation?

I’m trying to use Eclipse 2021-06 (4.20.0) with an OpenJDK implementation by BellSoft, Liberica JDK 16, that has JavaFX included out of the box. So far, everything goes OK except one rather unpleasant flaw. From Eclipse Java Editor, JavaFX documentation doesn’t open in the browser. When I click the “Open attached JavaDoc in a browser” button in the JavaDoc pop-up window for a JavaFX class, the browser tries to open the corresponding URL, for example “https://docs.oracle.com/en/java/javase/16/docs/api/javafx.graphics/javafx/scene/Node.html”, but the Oracle server has no page for this URL and shows a Page not found (404) error page.

Apparently, the JavaDoc URL for JavaFX should point to some other location, say “https://openjfx.io/javadoc/16/”, but I can’t find a way to set it up when JavaFX is included in the system library and Eclipse has the only item “JRE System Library (LibericaJDK-16-Full)” for that library in the project’s Java Build Path.

How can I make JavaFX JavaDoc accessible via a browser in this situation?

Advertisement

Answer

There is a solution, although not very fast and not very reliable. In the project properties window (project-> Properties or project-> Build Path -> Configure Buld Path…) one can unfold the system library item and change Javadoc Location for all modules related to the JavaFX so that it points to “https://openjfx.io/javadoc/16/”.

enter image description here

I consider this solution not quite reliable because I’m not quite sure that the Javadoc published on openjfx.io exactly matches the Javadoc comments in the JavaFX sources included in Liberica JDK.

Another, more reliable thought somewhat more time-consuming way to solve this issue would be to extract the JavaFX source files from the included zip file, src.zip, generate Javadoc for them and put the link to the generated Javadoc in the above-mentioned properties of the JavaFX modules in the Java Build Path window.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement