multiple key-value pairs in JNLP file

Dear All,

I have a JNLP file with multiple key-value pairs :

<resources>

<j2se version="1.4+"/>

<jar href="lib/myFile.jar"/>

<property name="url" value="URL/db"/>

<property name="default" value="10"/>

<property name="m1_query" value="URL1"/>

<property name="m2_query" value="URL2"/>

<property name="m3_query" value="URL3"/>

<property name="p1_query" value="URL4"/>

<property name="p2_query" value="URL5"/>

<property name="p3_query" value="URL6"/>

<property name="p4_query" value="URL7"/>

</resources>

I dont know what the key names are in the JNLP file so I cant use getProperty(keyname) directly. Is it possible to read all the key-value pairs in a HashMap and iterate through the list?

Or is there any other way of dealing with it?

Many thanks in advance.

Regards

Anuj

[1472 byte] By [agoela] at [2007-11-27 3:05:35]
# 1
Use propertyNames().
riema at 2007-7-12 3:51:15 > top of Java-index,Desktop,Deploying...
# 2

Hi Riem,

Thanks for your help ...

while waiting for a reply ... I managed to do sort out my problem.

Properties p = System.getProperties();

for (Enumeration enu = p.propertyNames() ; enu.hasMoreElements() ;) {

String key = (String)enu.nextElement();

Object value = p.getProperty(key);

if(!value.equals("")) {

keyValues.put(key, value);

}

}

Thanks for your help.

Cheers

Anuj

agoela at 2007-7-12 3:51:15 > top of Java-index,Desktop,Deploying...