Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
410 views
in Technique[技术] by (71.8m points)

java - Adding an external jar to Order and Export build path generates error in project

I have an eclipse plugin which has it's Java code structured in multiple projects. In one of the projects I added an external jar and used some classes from it. At compilation time no errors where reported, but at runtime, a NoClassDefFoundError exception was thrown. I fixed the problem following this solution.

After this I run a Project -> Clean.. and out of a sudden in a different project I have an error that The method filter(Predicate<? super String[]>) in the type FluentIterable<String[]> is not applicable for the arguments ....

I compared the FluentIterable clasess in both situations and their origin does not modify.

Why is this happening?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I was getting the error because the imported jar was using a different FluentIterable class from a guava jar. I thought the class origin is the same because when I switched back the build path, I did not execute a Project->Clean and eclipse was still pointing to the bad class location.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...