gpt4 book ai didi

swing - openjdk 8 : error - No public or protected classes found to document

转载 作者:行者123 更新时间:2023-11-29 04:24:09 28 4
gpt4 key购买 nike

我在 Debian 上,并且已经安装了 OpenJDK 8 以及软件包 openjdk-8-docdefault -jdk文档;但是,每当我向 javadoc 实用程序指定类或包名称时,我都无法查看 JDK 8 API 类的任何文档,它无法显示文档抛出以下错误:

  1. ArrayList 案例:

    kais@debian:~$ javadoc ArrayList
    Loading source files for package ArrayList...
    javadoc: warning - No source files for package ArrayList
    Constructing Javadoc information...
    javadoc: warning - No source files for package ArrayList
    javadoc: error - No public or protected classes found to document.
    1 error
    2 warnings
    kais@debian:~$ javadoc java.lang.ArrayList
    Loading source files for package java.lang.ArrayList...
    javadoc: warning - No source files for package java.lang.ArrayList
    Constructing Javadoc information...
    javadoc: warning - No source files for package java.lang.ArrayList
    javadoc: error - No public or protected classes found to document.
    1 error
    2 warnings
  2. JPanel 案例:

    kais@debian:~$ javadoc JPanel
    Loading source files for package JPanel...
    javadoc: warning - No source files for package JPanel
    Constructing Javadoc information...
    javadoc: warning - No source files for package JPanel
    javadoc: error - No public or protected classes found to document.
    1 error
    2 warnings
    kais@debian:~$ javadoc javax.swing.JPanel
    Loading source files for package javax.swing.JPanel...
    javadoc: warning - No source files for package javax.swing.JPanel
    Constructing Javadoc information...
    javadoc: warning - No source files for package javax.swing.JPanel
    javadoc: error - No public or protected classes found to document.
    1 error
    2 warnings
    kais@debian:~$ javadoc javax.swing
    Loading source files for package javax.swing...
    javadoc: warning - No source files for package javax.swing
    Constructing Javadoc information...
    javadoc: warning - No source files for package javax.swing
    javadoc: error - No public or protected classes found to document.
    1 error
    2 warnings

这在我看来很奇怪,因为安装包 openjdk-8-doc 应该包含 javadoc 所需的文档 ..

有什么想法吗?

最佳答案

Javadoc 工具应该从 Java 源代码创建 Javadoc。它不是显示特定类的 javadoc 的工具。 JVM 中类的 Javadoc 可在 Oracle 下载。或者可以浏览online .

正如你在问题中所说,你“安装”了相应JDK的文档,因此无需再次下载或在线浏览,你可以切换到文档包的“安装目录”并打开index-html 文件应该在其根目录下。

关于swing - openjdk 8 : error - No public or protected classes found to document,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47311680/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com