This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Scenario: I add a servlet.jar file (version 2.2 downloaded from java.sun.com) to my filesystem list in the explorer and try to list the methods of an interface called javax.servlet.ServletContext. There are (at least) two methods that are missing in the method list: public java.lang.String getInitParameter(java.lang.String name) public java.util.Enumeration getInitParameterNames() These methods should be displayed, I checked the contents of that servlet.jar with the javap utility. Possible problem: Apparently Forte CE uses an older version of the servlet.jar file which conforms to the version 2.1 of Servlet specification. This servlet.jar file defines the same classes and interfaces as the version 2.2 which I'm inspecting in the explorer. Instead of displaying the contents of javax.servlet.ServletContext interface from the 2.2 file, Forte displays the default (internal) version of this class which is 2.1.
Yes, the module which supports .class files without source currently uses something like Class.forName to load the class and then use introspection. This has several problems, for example the problem you mentioned (cannot inspect other versions of classes if they are already loaded inside the IDE core), and also for example that any static methods, etc. used in these classes will be run inside the IDE, which is not too nice. We are working on making the classloader more restrictive when loading these classes, but that is only a partial solution. Ideally the clazz module would parse the .class file (bytecode), rather than using introspection, though this would be a fair amount of work (for something which is not used that often).
Reopening
Clazz module is based on classfile (byte code parser) now.
Verified in 200210090100
Resolved for 3.3.x or earlier, no new info since then -> closing.