This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Buildpath problem with Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Buildpath problem with Eclipse" Watch "Buildpath problem with Eclipse" New topic

Buildpath problem with Eclipse

David Patterson
Ranch Hand

Joined: Jul 01, 2002
Posts: 65
I'm trying my first project in Eclipse. I have some existing code I'd like to keep out of Eclipse for now (deciding if I like it first.)

My existing source and class files are organized in a hierarchy that works for me with Ant. I have a directory structure (outside Eclipse)
including a Classpath pointer to \java\localclasses

There are other packages besides utils, but that is the only one I'm trying to use for now.

To get access to it in Eclipse, I've added a ClassPath variable, pointing to the localclasses folder, and added that to the BuildPath. Eclipse cannot find my classes. Much of the help seems to talk about finding "archives" and jar files, but shouldn't the Eclipse realize that a buildpath entry is not a jar, and look below it in the file system for the qualified names of packages being imported?

(My code has several "import com.patterd.utils.whatever" entries that remain flagged as unresolved.)

Thanks for any help.
Tim West
Ranch Hand

Joined: Mar 15, 2004
Posts: 539
Have you tried (In Project Properties -> Build Path) Add Library -> User Library -> User Libraries... -> New -> Add the relevant directory? I haven't used it, but it looks like what you want.

The other option, I guess, is to create a separate project with the dubious code, and to link the project. Not sure if this defeats the purpose of the whole exercise.

I'll be interested to hear how you solve this...sounds like one I'll run up against eventually.


Consider Paul's rocket mass heater.
subject: Buildpath problem with Eclipse
Similar Threads
Where to put your tests
Running a RMI Application
Standalone jar class/resource loading
Test Classes - newbie question
Stack trace analysis: what jar is contributing class?