I have a project I am working on in WebSphere Integration Developer 7.0 where I am trying to reference a public method I just wrote from a different package. I have an import statement included for the class my new method is in.
When I create an instance of my class and try to call my new method, I get a standard "method 'x' is undefined for the type 'y'" compiler error, indicating my new method isn't being recognized.
What's really peculiar to me is that when I press F3 to open the declaration of my class instance, I'm taken to the class declaration in the .class file rather than the .java file. I tried calling several other non-static methods from my class instance, which were recognized and also took me to the .class file when I opened their declarations. I have my .class and .java files for this class in the same directory.
I have cleaned and rebuilt the project to see if that would have any affect, but still see the same behavior.
So my question is, why would my IDE open the class and method declarations in the .class file rather than the .java file? I've never seen that before - could that be expected behavior within WID in this case, or does that suggest a problem with my environment?
Why the IDE opens the .class fileBecause, that is what the IDE finds listed in the
build path.It is very common behaviour.
For example, lets say we have 2 projects - project
Fand projectB.Now,
Fdepends onBfor its compilation butBcan be compiled independently.So, in order to build
F, we first buildBand then copy the artifacts generated as part of the build in the build path ofFor if we don't want to do copy/ paste, we just makeF's build path point to the artifact generated byB's build.Now, we can build
F. Here, whatFactually points to are a bunch of class files not the source.And, now if we try to access any files of
BfromF- IDE will intelligently open the.classfile(s) for us.