Advertisement
Guest User

Untitled

a guest
May 25th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. Properties props = new Properties();
  2. props.load(new FileInputStream("myfile.properties"));
  3. for (Enumeration<?> e = props.propertyNames(); e.hasMoreElements(); ) {
  4. String name = (String)e.nextElement();
  5. String value = props.getProperty(name);
  6. // now you have name and value
  7. if (name.startsWith("Appname")) {
  8. // this is the app name. Write yor code here
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement