• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

system variables in .properties file

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
How can use (access) the system variable's (like path,userprofile, windir, etc)values in my project's .properties file. I want to locate all my project related directories relative to these variables in my project's properties file.
 
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi seetharaman,

You can checkout this link.

It will give you all the information
 
seetharaman jayaraman
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Balasubramanian Chandrasekaran:
already i worked with all these. what i want is:
- i will store my .properties file in user.home
- this above .properties file should have entries to refer system variable's values like:
videofolder=%user.home%\video\;
audiofolder=%user.dir%\audio\;
- ie from my own .properties file i want to access/refer system variables
- How can i do this, syntax, sample, please!!

Thanks for your fast reply
 
seetharaman jayaraman
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
Inside a .properties file, accessing any location relatively like audio_dir=%userprofile%\audio, video_dir=%user.dir%\video,etc does not work.

But, inside the .properties file, we can specify like audio_dir=dir1\audio, video_dir=dir1\video, etc instead of using absolute (complete) path.
Automatically OS will check for these folders in Current Working Directory (CWD)

i.e. audio_dir=dir1\audio is equal to audio_dir=<CWD>\dir1\audio
[ June 17, 2008: Message edited by: seetharaman jayaraman ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic