How do I handle relative paths cross platform?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Harry_Greijer
Posted On:   Monday, September 29, 2003 10:59 PM

I have my install paths and project home path in a property file. I would like to use those an add relative paths in the build.xml file for coping stuff and so on.
My goal is to be able to run the same build.xml file on linux and windows. They are going to have diffrent propery files.
Is that possible?

Re: How do I handle relative paths cross platform?

Posted By:   Anonymous  
Posted On:   Tuesday, September 30, 2003 04:04 AM

yes


Need some more infos? :-) ok: os-specific pathseparators (/, ) are handled by Ant - choose the one you want (but be consistend in your buildfiles). I preper / because sometimes you have to mask the . You can load platform specific property files if you name them according to the value of the java system property "os.name". This is (like build-in props) available without doing extra work with ${os.name}.

About | Sitemap | Contact