Solved

Read multiple values from dynamic properties file in java

Posted on 2008-10-15
1
2,627 Views
Last Modified: 2013-11-23
I have a properties file which contains the following fields:

Tag1=[URL]
TagValue1=www.abc.com
Tag2=[Study Code]
TagValue2=ABC 123
....
What i need to accomplish is that if one of the tags in square brackets, such as [Tag1], the value in the will be replaced with the value specified after the equal sign.  If the value was not specified, then no modification to the copied collection title will be performed. Number of tags specified in properties can change so i need to make this dynamic. Basically, the properties file is dynamic and number of tags specified along with their values can change. How can i accomplish this task in Java?
0
Comment
Question by:CalmSoul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
javaexperto earned 500 total points
ID: 22736640
well lets see, what initials values have the tags in the left side? for example:
Tag1=[URL]
do you want to assign String URL to the variable Tag1?
what when you don't have [] like:
TagValue2=ABC 123
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question