开发者

referencing a directory from a different project in the properties file of another project

I am a Java novice

I am using Eclipse and I have a project (say Main Project) which has in its build path another project (let's call it Second Project).

I need to write in the directories section of the properties file of the Main Project the address of certain files which are part of the Second Project (and as result stored in the Second directory).

Considering the strin开发者_开发百科g properties.dir = ./proj/properties which is used to reference a directory named properties in the Main project, what should I use if this is in the Second project?

The string properties.dir = Second/proj/properties wouldn't do the job...


Building on Travis' comment: Are you sure you need to load the files as files?

If you can load them via the class loading mechanism (Class.getResourceAsStream), then all you have to do is have the Second Project on your build path.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜