Solved

Read multiple values from dynamic properties file in java

Posted on 2008-10-15
1
2,638 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

623 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