import java.io.FileInputStream;
import java.util.Properties;
public class PropView {
public static void main(String args[]) throws Exception {
Properties properties = System.getProperties();
properties.list(System.out);
FileInputStream in = null;
in = new FileInputStream(args[0]);
properties.load(in);
System.getProperties().list(System.out);
System.out.println("\nValue of local.animal.defined is "
+ Boolean.getBoolean("local.animal.defined"));
System.out.println("\nValue of local.animal.legcount is "
+ Integer.getInteger("local.animal.legcount"));
}
}
|