Discussion:
Netbeans 7.1.2 - Showing Generated Source File, No sources are attached to class 'JAR' File,
GChrome
13 years ago
Permalink
hi.

I've searching around google. Reading Bug reports with Netbeans 7 versions up regarding with Java generated source file, and i cant come up with any solution with this one, all i see is bunch of XML and lots of coding things that i dont understand, is there a simple way to attached that 'THING' to that 'JAR' file so I will be able to see the java library classes's generated source file? i never encountered this on Netbeans 6 versions
GChrome
13 years ago
Permalink
im sorry, my question seems to vague, but thank you for letting me know, actually what i mean with the SOURCE FILE thing is, for example you click a class say.. String class, it will go to the source, but it doesnt show anything, only "compiled code"
netero
13 years ago
Permalink
Hello again,

Now it's more clear, thanks.

First, you must check you have the sources somewhere:

- Open the menu "Tools" => "Java platforms"
- A window opens with 3 tabs (Classes / Sources / Javadoc). Select Sources.
You must have a link there pointing somewhere.

If you have a Oracle's version of java, there should be a "src.zip" at the root of the deployment
(at the same level as you see the folders bin, db, include, jre, ...).
So in the Sources tab, check if you have a correct link to this src.zip.

Then, for instance, if you are editing a java file in your project, and you type:
String a = "";
If ou place your cursor on the "String" word, ctrl-spacebar opens the javadoc,
and you have a small icon where you can click on "open source in editor". See the attached image

I don't know if there is a better and more direct way, my knowlege ends here.
But does it already help you?

Regards.
netero




Attachments:
Failed to load image: http://forums.netbeans.org//files/open_source_in_editor_332.png
uv777
13 years ago
Permalink
I also have the same case when I use struts or struts 2 framework to build my project

public class ActionSupport implements Action, Validateable, ValidationAware, TextProvider, LocaleProvider, Serializable {

protected static Logger LOG;
private final ValidationAwareSupport validationAware;
private transient TextProvider textProvider;
private Container container;

public ActionSupport() {
//compiled code
throw new RuntimeException("Compiled Code");
}

public void setActionErrors(Collection<String> errorMessages) {
//compiled code
throw new RuntimeException("Compiled Code");
}

public Collection<String> getActionErrors() {
//compiled code
throw new RuntimeException("Compiled Code");
}

There are so many JAR files that are with the same problems, and "Showing generate source file. No source are attached to class JAR file", what happen?
Loading...