if (c == null)
throw new CommandException(new Exception(),
"No current context");
try {
Hashtable env = NamingShell.getInitialContext().getEnvironment();
Enumeration enum = env.keys();
String key;
while (enum.hasMoreElements()) {
key = (String)enum.nextElement();
System.out.println(key + "\t" + env.get(key));
}
Hashtable sysProps = System.getProperties();
Enumeration sysEnum = sysProps.keys();
while (sysEnum.hasMoreElements()) {
key = (String)sysEnum.nextElement();
System.out.println(key + "\t" + sysProps.get(key));
}
}
catch (NamingException ne) {
throw new CommandException(ne, "Couldn't get the environment of "
+ NamingShell.getCurrentContext());
}