P
printdude1968
I'm running Java 5.0 using Eclipse.
This piece of code is failing within the IDE.
import java.util.*;
/**
This program prints out all system properties.
*/
public class SystemInfo
{
public static void main(String args[])
{
Properties systemProperties = System.getProperties();
Enumeration enum = systemProperties.propertyNames();
while (enum.hasMoreElements())
{
String key = (String)enum.nextElement();
System.out.println(key + "=" +
systemProperties.getProperty(key));
}
}
}
The API says (I think) that it's right but nothing I do can make it
work.
Any ideas?
This piece of code is failing within the IDE.
import java.util.*;
/**
This program prints out all system properties.
*/
public class SystemInfo
{
public static void main(String args[])
{
Properties systemProperties = System.getProperties();
Enumeration enum = systemProperties.propertyNames();
while (enum.hasMoreElements())
{
String key = (String)enum.nextElement();
System.out.println(key + "=" +
systemProperties.getProperty(key));
}
}
}
The API says (I think) that it's right but nothing I do can make it
work.
Any ideas?