Question

Using the debugger in Netbeans 6.1, I'd like to step into a method of the JSF library (specifically method saveSerializedView of class StateManager), but I cannot figure out how to specify through the IDE the location of the source code for the JSF library. I'm even having trouble determining which jar file or files Netbeans is using for JSF.

Was it helpful?

Solution

This answer applies to Netbeans 6.1 circa September 2008:

It sounds as if you need to explore the "Libraries" dialog. Select "Tools" from the menu bar and "Libraries" from the menu. If you select "JSF" on the left, you'll see an association of jar files, sources (currently none in my Netbeans 6.1) and javadoc (which shows javaee5-doc-api.zip in my Netbeans).

What you need to do is add a new zip or jar of source files under the "Sources" tag.

An example of a fully populated library is the "Swing Layout Extensions" which has a jar file, sources and javadoc.

OTHER TIPS

I take it your jars don't include the source, since you can't "step into." In cases like these what I do is find the appropriate source (just StateManager.java in this case, if it's available, or jars that include source), taking care that it is the version I'm using. Inside my project tree, I create the package hierarchy to that specific class, and put that source in there. Even if the class exists in a jar, I can use this source to set breakpoints, etc.

Example for Netbeans7 and Mojarra 2.0.3
Create a new library(Tools->Libraries), call it for example Mojarra-2.0.3.
In the classpath tab add the 2 mojarra jars:

  • jsf-api.jar
  • jsf-impl.jar

In the sources tab, add two paths:

  • ..\mojarra-2.0.3-FCS-source\jsf-api\src\main\java\

  • ..\mojarra-2.0.3-FCS-source\jsf-ri\src\main\java\ Add the new created library to the project

download the jsf source and point to the working folder for source lookup.. It will dig into the code

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top