• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

specify path build.properties of ant

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi -

Is there a way to specify a network path in the build.properties file for ant?

Example, build.properties has -

mylib=\\machine_name\lib

When I try to run the build file, it fails because ant is trying to look in C:\machine_name\lib.

What is the right way to specify the network path in build.properties file?
Thanks.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to escape backslashes in property files, just as you would do in Java String literals.
 
Saloon Keeper
Posts: 25477
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ilja Preuss:
You need to escape backslashes in property files, just as you would do in Java String literals.



... Which can get really ugly. Try this instead:

mylib=//machine_name/lib

Because this is a UNC name, I won't guarantee it will work, but in most cases, "portable" filepaths can be created for Java using the Unix forward-slash syntax and Windows will understand.
 
Suma Rangaraj
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response guys.

In case it helps others, I have achieved this by mounting the disk on the local machine. So, I no longer have to use the network path. I can refer to it as
mylib=D:\\<path to libs>
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic