开发者

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

开发者 https://www.devze.com 2022-12-19 00:04 出处:网络
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 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

精彩评论

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