Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Buildpath problem with Eclipse

Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic