Netbeans 11 Javadoc没出现? [英] Netbeans 11 Javadoc Not Appearing?
问题描述
我有一个非常类似于 Javadocs的问题我似乎无法在我的Apache Netbeans 11版本或正在开发的Maven项目中添加Javadoc支持,因此没有出现在Java 10的Apache netbeans上.
I have a question very similar to Javadocs are not appearing on Apache netbeans for java 10 in the sense that I can't seem to add javadoc support to my Apache Netbeans 11 release, or the maven project that I'm working on.
这是我的概述:
如您所见,javadoc已添加到URL部分,但即使重新启动后也不会出现在代码编辑器中.
As you can see, the javadoc is added in the URL section, but it does not appear in the code editor, even after a restart.
我添加的URL: https://docs.oracle.com/en/java/javase/11/docs/api/index.html
但这是行不通的.
我该如何解决?
推荐答案
在NB的源代码编辑器的弹出式Javadoc和显示Javadoc"功能(将打开一个外部浏览器),这两个NB功能在标准Ubuntu安装中均不起作用.
Whilst Netbeans 11 runs well with Ubuntu 18's apt packet "openjdk-11-jdk", when it comes to NB's source-editor's pop-up-Javadoc and "show Javadoc" function (which opens an external browser), both NB functions don't work on a standard Ubuntu installation.
因为NB的Javadoc函数似乎与"/usr/lib/jvm/java-11-openjdk-…"中的"openjdk-11-jdk"包的文件结构非常不同,因此与可下载的Openjdk11 zip略有不同捆绑包.
Because NB's Javadoc functions seem so dislike the "openjdk-11-jdk" packet's file structure in "/usr/lib/jvm/java-11-openjdk-…" which is slightly different to the one from the downloadable Openjdk11 zip bundle.
以下是使两个功能均起作用的解决方案:
Here's the solution to make both functions work:
- 从Openjdk网站下载适用于Linux的Openjdk11 zip软件包: https://jdk.java.net/archive /
- 将其解压缩,使其内容位于文件夹中,例如"openjdk11"
- 在NB中,转到菜单工具→Java平台".添加一个新平台并选择解压缩的文件夹(例如,openjdk11). NB在src.zip文件中找到了正确的源文件夹.
最后,在NB项目属性中,将"Java平台"的库"更改为新添加的Openjdk11平台,现在NB的弹出式Javadoc可以再次使用.
Finally in your NB project property, change in "Libraries" the "Java Platform" to your newly added Openjdk11 platform, and now NB's pop-up-Javadoc works again.
要同时拥有NB的显示Javadoc"功能,请执行以下附加步骤:
To also have NB's "show Javadoc" functionality, do this additional step please:
- 下载Oracle的Javadoc11 zip文件并解压缩.
- 现在再次进入NB的"Java平台"对话框.在先前添加的平台"Openjdk11"中,转到第三个名为"Javadoc"的选项卡,并将"doc/api/"文件夹中的所有"java *"子文件夹添加为文件夹.
就是这样.希望对您有所帮助.
That's it. Hope it helps.
顺便说一句,现在NB仍在Ubuntu已安装的Openjdk11 JVM中运行(来自包装"openjdk-11-jdk"),并将获得apt-automatic更新,但是您的项目使用解压缩的JVM来运行.但是,这没什么大不了的,因为NB始终使用其使用的JVM或项目JVM的新实例来运行项目.
Btw, now NB still runs inside Ubuntu's installed Openjdk11 JVM (from the paket "openjdk-11-jdk") and will get apt-automatic updates, however your projects use the unzipped JVM to run. This is no big deal however, since NB always uses a new instance of its used JVM or of the project's JVM to run a project.
这篇关于Netbeans 11 Javadoc没出现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!