• 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

environment variables and substitution into properties

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you define a property that includes ${ENV[varname]}, when you call getProperty for that property, it will substitute the environment variable varname in place of the ${ENV[varname]}. At least, it does it when I run on Windows. But when I run on Suse Linux 11, it does not: ${ENV[varname]} remains in the property string, with no substitution. I can see the environment variable present in bash--but the substitution does not take place when I retrieve the property. Any suggestions where to start looking?
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don’t know. Sorry. But not amongst us beginners who frequent this area of cyberspace, so I shall move this thread.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Clayton Cramer wrote:If you define a property that includes ${ENV[varname]}, when you call getProperty for that property, it will substitute the environment variable varname in place of the ${ENV[varname]}. At least, it does it when I run on Windows. But when I run on Suse Linux 11, it does not: ${ENV[varname]} remains in the property string, with no substitution. I can see the environment variable present in bash--but the substitution does not take place when I retrieve the property. Any suggestions where to start looking?


Like Campbell, I was completely unaware of such a construct in Java (and I see no reference to it in the java.util.Properties documentation - version 6, at least).

Perhaps you could explain where this definition comes from?

Winston
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried googling and found this, which seems to be related to Ant.
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I tried googling and found this, which seems to be related to Ant.


Cheers mush.

Winston
 
reply
    Bookmark Topic Watch Topic
  • New Topic