2

I am a Java beginner, using Eclipse. I am trying to understand the NASA World Wind package. Specifically code that looks like this:

    protected WorldWindow wwd;
    protected StatusBar statusBar;
    protected ToolTipController toolTipController;
    protected HighlightController highlightController;

When I mouse over "WorldWindow" it says

Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.

The code compiles and runs, though.

However, it points to a package in a JAR file. I can find the class it is referring to. But I cannot read the class file. When I double click on it, I get "Source not found" in the Class File Editor.

I want to understand how this code works. How can I read the class files within the JAR?

4

4 回答 4

4

读取 jar 中的实际类文件需要使用 JD-GUI 等工具进行反编译。

然而,快速的 Google 搜索返回了整个库的 Javadocs。

http://builds.worldwind.arc.nasa.gov/worldwind-releases/daily/docs/api/index.html

享受!

于 2013-06-11T20:30:54.737 回答
3

使用反编译器 - 尝试JD-Eclipse,一个 Eclipse 插件。安装后,您应该能够单击要查看的类并被定向到 JAR 文件中的反编译代码。

在此处输入图像描述

于 2013-06-11T20:30:20.320 回答
2
于 2013-06-11T20:35:00.890 回答
2

您必须将类文件“反编译”为可读的 java 代码。有几个很好的反编译器,这里有一个非常流行的JD-GUI

此外,如果您使用的是 IDE,您通常可以下载 src 文件并附加它们,以便在编写程序时用作 javadoc。

于 2013-06-11T20:30:37.383 回答