aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes How do I add directories to the classpath in Eclipse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How do I add directories to the classpath in Eclipse?" Watch "How do I add directories to the classpath in Eclipse?" New topic
Author

How do I add directories to the classpath in Eclipse?

Magnus Falk
Greenhorn

Joined: Apr 17, 2008
Posts: 4
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
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

compile or runtime classpath?
Magnus Falk
Greenhorn

Joined: Apr 17, 2008
Posts: 4
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

Joined: Mar 06, 2001
Posts: 13459

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

Joined: Apr 17, 2008
Posts: 4
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I add directories to the classpath in Eclipse?