ResourceBundle ir = ResourceBundle.getBundle("
how do i get the number of 'key-value' here ??
Main Topics
Browse All Topics1) usin resourcebundle.. how can i get the total number of key-value in the properties file ?
2) String file = "c:\test\test.txt";
how can i separation the path, extension etc into :
directory = "test\"
filename = "test"
extension = "txt"
3) how can i refresh a Jlist with a totally new list ?
can someone pls help mi..tankz ;>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Sorry, I seem to have misunderstood number 1)
http://java.sun.com/docs/b
may give you more detail.
Cheers,
Nik
2)
Create a File object such as:
File f = new File("C:\files\dev\me.txt"
I believe that File has two methods which can isolate the path and filename.
f.getName() will return the file name
---> me.txt
f.getPath() will return the file path
---> C:\files\dev\
To seperate the file name to get the extension, just iterate through each character, or use a StringTokenizer.
Hope this helps.
Brett
Business Accounts
Answer for Membership
by: diakovPosted on 2000-08-14 at 04:27:19ID: 3916476
3) list.getModel().clear() and then ement)
list.getModel().add(new_el
2) Use StringTockenizer(file, File.separator);
StringTokenizer st = new StringTokenizer(file, java.io.File.separator);
while (st.hasMoreTokens()) {
println(st.nextToken());
}
Note that the File.separator is necessary to be used as on UNIX it is the other slash.
1) Open an InputStream to the properties file and then use
Properties ps = new Properties();
ps.load(the_input_stream);
after that, ps.size() will give you the number of the (key, value) pairs.
Cheers,
Nik