I want to pass the path to my log4j.properties file from the ant command line. For testing purposes the file exists on the Windows server in the path c:\mypath\log4j.properties.
I've tried a number of variations on:
ant -Dlog4j.configuration=file\mypath\log4j.properties target
ant -Dlog4j.configuration=D:\mypath\log4j.properties target
ant -Dlog4j.configuration=file://mypath/log4j.properties target

I've also tried setting an env variable in the form ANT_OPTS=-Dlog4j.configuration=file\mypath\log4j.properties (same variations)

Can anyone tell me if I'm approaching this the right way? Syntax example?

Thank you.