Build error on class from imported jar [message #76562] |
Tue, 17 June 2003 13:28  |
Eclipse User |
|
|
|
Don't know whether this is a bug, or user error.
I'm developing a plugin. I have packaged a number of classes into a jar
file, and then added that jar to the build path the plugin project. I
have also explicitly listed that jar in the <required> section of my
plugin.xml, and dropped a copy of the jar in the root directory for my
plugin.
I am using the PDE luancher to do iterative development of my plugin. At
one point, there seemed to be a problem with a static method called on one
of the classes in my jar. In order to isolate the problem, I attempted to
use poor debugging (System.out.println) and call this static method
directly.
However, the incremental compiler reports that it cannot resolve the
referenced class. If I attempt CTRL-SHIFT-O to 'organize imports',
nothing happens, so I tried manually adding the required import statement.
That simply added a warning stating the the import could not be resolved.
However, ALL other aspects of Eclipse seem to understand this class. I
can navigate into my jar file in the Package Explorer, and bring up
correct info about the class that way. If I put my cursor in the class
name and hit CTRL-1 (fix), the first fix it proposes is that I add the
required import (and the fully-qualified class name given in the hint is
correct). In fact, if I attempt to assign the return value of this static
method to a variable of incorrect type, Eclipse will catch the error and
notify me of the correct return type for the static method.
So, it appears that everything in Eclipse EXCEPT the incremental compiler
understands what I'm trying to do. Is this users error, or should I
submit a bug report?
--dave
|
|
|
Re: Build error on class from imported jar [message #76628 is a reply to message #76562] |
Tue, 17 June 2003 13:41  |
Eclipse User |
|
|
|
Well, I re-started Eclipse, and the error went away.
So, seems like a bug to me.
David Bailey wrote:
> Don't know whether this is a bug, or user error.
> I'm developing a plugin. I have packaged a number of classes into a jar
> file, and then added that jar to the build path the plugin project. I
> have also explicitly listed that jar in the <required> section of my
> plugin.xml, and dropped a copy of the jar in the root directory for my
> plugin.
> I am using the PDE luancher to do iterative development of my plugin. At
> one point, there seemed to be a problem with a static method called on one
> of the classes in my jar. In order to isolate the problem, I attempted to
> use poor debugging (System.out.println) and call this static method
> directly.
> However, the incremental compiler reports that it cannot resolve the
> referenced class. If I attempt CTRL-SHIFT-O to 'organize imports',
> nothing happens, so I tried manually adding the required import statement.
> That simply added a warning stating the the import could not be resolved.
> However, ALL other aspects of Eclipse seem to understand this class. I
> can navigate into my jar file in the Package Explorer, and bring up
> correct info about the class that way. If I put my cursor in the class
> name and hit CTRL-1 (fix), the first fix it proposes is that I add the
> required import (and the fully-qualified class name given in the hint is
> correct). In fact, if I attempt to assign the return value of this static
> method to a variable of incorrect type, Eclipse will catch the error and
> notify me of the correct return type for the static method.
> So, it appears that everything in Eclipse EXCEPT the incremental compiler
> understands what I'm trying to do. Is this users error, or should I
> submit a bug report?
> --dave
|
|
|
Powered by
FUDForum. Page generated in 0.02753 seconds