• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I add directories to the classpath in Eclipse?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the project I'm working on we're reading resource bundles from the classpath and it works fine when doing regular ANT builds. We just put a directory on the classpath and are then able to reference our bundles in the code.

Eclipse however, can't stand the fact that we've included a non-JAR file in the classpath and treats it as an error. Is there a way around this?

Cheers,
Magnus
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
compile or runtime classpath?
 
Magnus Falk
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Runtime classpath (I think). But I'm pretty sure I've managed to figure it out. It seems to simply be a matter of marking the directory as a source folder (as if it contained Java files) via Project->Build Path->New Source Folder.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That will do it, or you can go to the "Run..." dialog and add it to the classpath for that runnable. But if you're happy, I'm happy.
 
Magnus Falk
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, I managed to figure that one out before, but the prospect of adding that directory to every single test case relying on that bundle was a bit daunting and I figured that it had to be a better way.

But anyways, it works now so I'm happy =) Thanks for the help!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic