Netbeans 11 Javadoc 没有出现? [英] Netbeans 11 Javadoc Not Appearing?

查看:35
本文介绍了Netbeans 11 Javadoc 没有出现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个与

如您所见,javadoc 已添加到 URL 部分,但它不会出现在代码编辑器中,即使在重新启动后也是如此.

我添加的网址:https://docs.oracle.com/en/java/javase/11/docs/api/index.html

但这不起作用.

我该如何解决这个问题?

解决方案

虽然 Netbeans 11 与 Ubuntu 18 的 apt 包openjdk-11-jdk"运行良好,但当涉及到 NB 的源代码编辑器的弹出窗口 Javadoc 和显示 Javadoc"功能(打开外部浏览器),这两个 NB 功能在标准 Ubuntu 安装上不起作用.

因为 NB 的 Javadoc 函数看起来很不喜欢/usr/lib/jvm/java-11-openjdk-..."中的openjdk-11-jdk"包的文件结构,它与可下载的 Openjdk11 zip 中的略有不同捆绑.

这是使这两个功能都起作用的解决方案:

  • 从 Openjdk 的网站下载适用于 Linux 的 Openjdk11 zip 包:https://jdk.java.net/archive/
  • 将其解压缩,使其内容位于一个文件夹中,例如openjdk11"
  • 在 NB 中,转到菜单工具 → Java 平台".添加一个新平台并选择解压后的文件夹(例如 openjdk11).NB 在 src.zip 文件中找出正确的源文件夹.

最后在您的 NB 项目属性中,将库"中的Java 平台"更改为新添加的 Openjdk11 平台,现在 NB 的弹出式 Javadoc 再次起作用.

要同时具有 NB 的显示 Javadoc"功能,请执行此附加步骤:

  • 下载 Oracle 的 Javadoc11 zip 文件并解压.
  • 现在再次进入NB的Java平台"对话和.在之前添加的平台Openjdk11"中,转到名为Javadoc"的第三个选项卡,并将doc/api/"文件夹中的所有java*"子文件夹添加为文件夹.

就是这样.希望有帮助.

顺便说一句,现在 NB 仍然在 Ubuntu 安装的 Openjdk11 JVM(来自openjdk-11-jdk"包)中运行,并且将获得 apt-automatic 更新,但是您的项目使用解压缩的 JVM 来运行.不过这没什么大不了的,因为 NB 总是使用其使用过的 JVM 或项目的 JVM 的新实例来运行项目.

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.

Here is the overview that I have:

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.

The URL I added: https://docs.oracle.com/en/java/javase/11/docs/api/index.html

But this doesn't work.

How can I resolve this?

解决方案

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.

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:

  • Download the Openjdk11 zip bundle for Linux from the Openjdk's website: https://jdk.java.net/archive/
  • Unzip it, so that its content is in a folder, like for example "openjdk11"
  • In NB go to the menu "Tools → Java platforms". Add a new platform and select the unzipped folder (openjdk11 for example). NB finds out the correct sources folders inside the src.zip file.

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.

To also have NB's "show Javadoc" functionality, do this additional step please:

  • Download Oracle's Javadoc11 zip file and unzip it.
  • Now go to NB's "Java platform" dialogue again and. In the previously added platform "Openjdk11" go to the third tab named "Javadoc" and add as folders all the "java*" subfolders inside the "doc/api/" folder.

That's it. Hope it helps.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆