Eclipse not finding classes. [message #215763] |
Wed, 18 June 2008 17:41 |
Eclipse User |
|
|
|
Originally posted by: jim.fayettedigital.com
I have a jar file with classes, but they are not included in a package.
The jar is in the WEB-INF/lib directory however I get errors saying
things like Stem cannot be resolved to a type. However the jar file has
a Stem class in it.
source line:
Stem stem = new Stem("english");
jar -tf ~/ProjectWorkspace/JXSearch/WebContent/WEB-INF/lib/xapian_jn i.jar
META-INF/
META-INF/MANIFEST.MF
Auto.class
BM25Weight.class
BoolWeight.class
....
SimpleStopper.class
Sorter.class
Stem.class
Stopper.class
StringValueRangeProcessor.class
SWIGTYPE_p_std__string.class
TermGenerator.class
....
I was using an older version of the library that had things in a package
but the authors decided to use SWIG rather than hand code and for some
reason didn't put the library in a package.
Any thoughts as to how I can reference this library correctly?
THanks,
Jim.
|
|
|
Re: Eclipse not finding classes. [message #215804 is a reply to message #215763] |
Thu, 19 June 2008 08:04 |
Eclipse User |
|
|
|
Originally posted by: wknauf_NO_._INSIDE_hg-online.de
Hi Jim,
placing JARs in WEB-INF/lib is sufficient, Eclipse should find them.
How did you add the JAR to WEB-INF/lib? Did you copy it in the file system, or
did you add it through eclipse? If you did it the first way: have you
"Refreshed" your project (option in context menu)?
Best regards
Wolfgang
Jim Lynch schrieb:
> I have a jar file with classes, but they are not included in a package.
> The jar is in the WEB-INF/lib directory however I get errors saying
> things like Stem cannot be resolved to a type. However the jar file has
> a Stem class in it.
>
|
|
|
Re: Eclipse not finding classes. [message #215812 is a reply to message #215804] |
Thu, 19 June 2008 08:40 |
Eclipse User |
|
|
|
Originally posted by: jim.fayettedigital.com
Wolfgang Knauf wrote:
> Hi Jim,
>
> placing JARs in WEB-INF/lib is sufficient, Eclipse should find them.
> How did you add the JAR to WEB-INF/lib? Did you copy it in the file
> system, or did you add it through eclipse? If you did it the first way:
> have you "Refreshed" your project (option in context menu)?
>
> Best regards
>
> Wolfgang
>
> Jim Lynch schrieb:
>> I have a jar file with classes, but they are not included in a
>> package. The jar is in the WEB-INF/lib directory however I get errors
>> saying things like Stem cannot be resolved to a type. However the jar
>> file has a Stem class in it.
>>
Hi Wolfgang,
I did refresh numerous times. I copied it outside of Eclipse. It's
showing up in the list of libraries in the Project Explorer/Java
resources:src/Libraries.
The problem seems to be that there are no packages defined for the
classes in the jar file. I have the source code and there are none in
the sources either. These files were produced with Swig from C++ source.
Jim.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03544 seconds