• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Replace with Properties

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking to use a property file to replace text properties embedded in another file.
Basically,

- load property file
- foreach property
replace propertyName in text file
with propertyValue

How do you get all the property names in a .properties file into a list and then access their values?

thanks!
Steven
 
Sheriff
Posts: 67265
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have changed your display name to an invalid value. Please restore the valid value prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

bear
JavaRanch Sheriff
[ May 11, 2006: Message edited by: Bear Bibeault ]
 
Bartender
Posts: 20828
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ant has a substitution option on its copy task.
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use filter in copy tesk.
 
Steven Martin
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But how do I iterate through the properties names and properties values from the properties file?
 
Bear Bibeault
Sheriff
Posts: 67265
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"stevenmartin",

My request that you change your display name to adhere to JavaRanch standards was not a suggestion. Valid display names are mandatory for participation on the Ranch. Please change your display name as instructed immediately.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!