Showing Javadoc for standard libraries (java.base, ...) is working fine in my setup.
But including Javadoc for additional libraries fails all the time. I am looking for a hint, what can be done to fix this problem or to get more output for the root cause of this problem.
I have the following source code:
import com.fazecast.jSerialComm.SerialPort;
public class JavaTestAoolication {
public static void main(String[] args) {
SerialPort.getCommPorts();
}
}
I try to add javadoc path for this library via menu Tools -> Java Platforms and tab javadoc.
This results in the following entries in the netbeans configuration file ~/.netbeans/11.3/config/Services/Platforms/org-netbeans-api-java-Platform/default_platform.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE platform PUBLIC "-//NetBeans//DTD Java PlatformDefinition 1.0//EN" "http://www.netbeans.org/dtds/java-platformdefinition-1_0.dtd">
<platform default="yes" name="JDK 11 (Default)">
<properties>
<property name="platform.ant.name" value="default_platform"/>
</properties>
<javadoc>
...
<resource>https://fazecast.github.io/jSerialComm/javadoc/</resource>
<resource>file:/usr/share/htl-libjserialcomm-java/2.6.1/javadoc/api/</resource>
...
</javadoc>
</platform>
Selecting context menu -> Show Javadoc on SerialPort.getCommPorts()
always results in the message:
Cannot Perform show Javadoc here.
But the link is existing:
https://fazecast.github.io/jSerialComm/javadoc/com/fazecast/jSerialComm/SerialPort.html
And also the local folder is existing (without symbolic links):
$ ls -la /usr/share/htl-libjserialcomm-java/2.6.1/javadoc/api/com/fazecast/jSerialComm/SerialPort.html
-rw-r--r-- 1 user user 115981 Apr 9 17:02 /usr/share/htl-libjserialcomm-java/2.6.1/javadoc/api/com/fazecast/jSerialComm/SerialPort.html
I also try to use file://
instead of file:/
. No success.
Any ideas how to solve this problem?
TLDR: I experienced similar problems to you, but there is a fairly simple workaround:
Here are the details:
*.java
source files for the project will be in the unzipped directory ...\Fazecast-jSerialComm-v2.6.1-0-gf3d1e89\Fazecast-jSerialComm-f3d1e89\src\main\java\com\fazecast\jSerialComm
.com.fazecast
package in the unzipped source directory. In my case this was D:\Downloads\FazecastJSerialComm\Fazecast-jSerialComm-v2.6.1-0-gf3d1e89\Fazecast-jSerialComm-f3d1e89\src\main\java
Once you have done that, close and reopen your source file that's calling Fazecast methods and the javadoc should work. Here's an example for SerialPort.getCommPorts()
, where I inserted HELLO WORLD!!!
in the javadoc of that method to demonstrate that the local source was being accessed:
Notes: