Learn to use Java System Properties

public class Ver
{
    public static void main(String args[])
    {
        String envVar[] = {
        "java.version",
        "java.vendor",
        "java.vendor.url",
        "java.home",
        "java.vm.specification.version",
        "java.vm.specification.vendor",
        "java.vm.specification.name",
        "java.vm.version",
        "java.vm.vendor",
        "java.vm.name",
        "java.specification.version",
        "java.specification.vendor",
        "java.specification.name",
        "java.class.version",
        "java.class.path",
        "java.library.path",
        "java.io.tmpdir",
        "java.compiler",
        "java.ext.dirs",
        "os.name",
        "os.arch",
        "os.version",
        "file.separator",
        "path.separator",
        "line.separator",
        "user.name",
        "user.home",
        "user.dir"
        };
 
        for (int i=0; i<envVar.length; i++)
        {
            System.out.println(
                envVar[i] +
                " = " +
                System.getProperty(envVar[i])
                );
        }
    }
}

javasystemprop.txt · Last modified: 2014/10/26 01:52 (external edit)
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0