Jeanne, I'm using ant in Eclipse for the sample project.All ant build tasks(like compile,clean,dist) are executed successfully in the Eclipse Ant View.But in the java source file editor,Eclipse still prompt me:The import my.lib.* cannot be resolved. If I migrate one Java project into Eclipse,should I add tens of external jars into Eclipse project properties by hand(Even though I completely use Eclipse ant view to build the project)?

Xu, Now I see what you are trying to do. You can actually turn off the Eclipse build, since you are using Ant. And in project level preferences, remove the java builder from the list of external builders. (You could replace this with your ant build if you want or just delete it.) Then Eclipse will no longer attempt to compile.

Xu Song
Greenhorn

Joined: Nov 16, 2001
Posts: 20

posted Jul 24, 2004 03:37:00

0

Jeanne, That's exactly the way I have tried.In project level preferences,I uncheck "Java Builder" in 'Builders config table'(it's impossible to remove),and new an 'ant builder'.I confirm I've disabled the 'Build automatically' option as well. But it still reports:"The import my.lib cannot be resolved".

Xu, I think it might be remembering from a previous compile. Try deleting the .class files and rebuilding with Ant.

Xu Song
Greenhorn

Joined: Nov 16, 2001
Posts: 20

posted Jul 25, 2004 20:31:00

0

Jeanne, Triled but failed again. I checked the help document:Workbench User Guide-->Ant & external tools tutorial-->Use cases for Ant in Eclise-->Ant buildfiles as project builder-->Creating a project builder Ant buildfile. I can find in last paragraph of this page:"internal Eclipse Java compiler which in turn is responsible for indexing your source so that searching, refactoring and many other features are available. Thus it is not possible to replace the internal Eclipse Java compiler by using a project builder". It seems that the default Java Builder is always mandatory though the last line in the page says 'you can disable the Java Builder'. Anyway,my decision:Come back to the jEdit's ant plugin.Currently flexibility is more convenient than integration for me(compare jEdit with Eclipse). Thanks a lot for your comments.