Reputation: 520
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?
Upvotes: 2
Views: 1661
Reputation: 118
Reading the actual class files in the jar would require decompiling with a tool such as JD-GUI.
However a quick Google search returned the Javadocs for the entire library.
http://builds.worldwind.arc.nasa.gov/worldwind-releases/daily/docs/api/index.html
Enjoy!
Upvotes: 4
Reputation: 5218
The project you are using is open source, so you have a few options at this point.
Upvotes: 2
Reputation: 7507
You have to "decompile" the class file into readable java code. There are several good decompilers out there, here is a very popular one JD-GUI.
Also if you are using an IDE you often can download the src files and attach them just to use as javadocs while writing your program.
Upvotes: 2
Reputation: 129507
Use a decompiler - try JD-Eclipse, an Eclipse plugin. After installing it, you should be able to click on the classes you want to view and be directed to decompiled code from within the JAR file.
Upvotes: 3