编译 openjdk-7 时找不到 sun.tools.java.*

Cannot find sun.tools.java.* while compiling openjdk-7

我正在尝试在 Ubuntu 14.04 上编译 openjdk-7 源代码:

export LANG=C ALT_BOOTDIR=/usr
make all

我看到了一些错误,例如:

symbol: class ClassNotFound
location: class CompoundType
../../../../src/share/classes/sun/rmi/rmic/iiop/CompoundType.java:1299: error: cannot find symbol

这些缺失的 类 都在名为 sun.tools.java 的包中。我怀疑这些是 jdk 构建过程所需的一些非标准库。但是我在在线构建教程中找不到相关信息。那么这些缺失的是什么 类 以及我该如何修复它们?

谢谢。

某些应用程序需要 JDK 中的 tools.jar,其中包含这些软件包。这通常用于生成代码的运行时编译。将此添加到 JDK 的 class 路径。

注意:这些不是您通常通过 RMI 传递的包。我会查看 classes 以了解为什么需要这样做。