Java Example Program / Sample Source Code
import java.applet.Applet;
import java.awt.Graphics;
public class ReadSystemProperties extends Applet { String value; // Applet cannot read the following properties // java.home // java.class.path // user.name // user.home // user.dir // Applet can read the following properties // java.vendor // java.vendor.url // java.class.version // os.name // os.arch // os.version // file.separator // path.separator // line.separator public void init() { value = System.getProperty("os.name"); } public void paint(Graphics g) { g.drawString(value, 40, 60); }
} |
|
|