| Author |
How to find a key is avaiable in property file
|
Kaarthick Ramamoorthi
Greenhorn
Joined: Jul 21, 2010
Posts: 2
|
|
Hi,
I have a properties file with key/value continue=y. My requirement is to first find whether the key is avialable in this file and If it is available they I have to get the value.
I tried <isset> but it does not work out. Is there any element available to find the key?
Thanks
Kaarthick
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3206
|
|
|
Can you not just use the Java Properties class?
|
Cheers, Martijn - Blog, Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 23182
|
|
Kaarthick,
How did you load the property file into Ant? <isset> should work if you have loaded it correctly. Can you show the code?
Martijn,
If something can be done in native Ant, why would you want to insert Java code in a build script?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Certs: SCEA Part 1, Part 2 & 3 & Core Spring 3
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3206
|
|
Jeanne Boyarsky wrote:Kaarthick,
If something can be done in native Ant, why would you want to insert Java code in a build script?
You wouldn't, I was subtlety trying to get Kaarthick to state that he was using ANT
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 23182
|
|
Too subtle .
|
 |
 |
|
|
subject: How to find a key is avaiable in property file
|
|
|