home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 25 / IOPROG_25.ISO / SOFT / JavaS / javastar-eval.exe / data1.cab / Program_Files / contrib / utils / SystemProperties.java < prev   
Encoding:
Java Source  |  1999-02-11  |  1.4 KB  |  45 lines

  1. /*
  2.  *  @version             @(#)SystemProperties.java    1.3 98/07/28
  3.  *
  4.  * Copyright (c) 1997-1998 Sun Microsystems, Inc. All Rights Reserved.
  5.  *
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  *
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  */
  19.  
  20. public class SystemProperties {
  21.  
  22.   public final static String[] vars = {
  23.     "java.home",
  24.     "java.class.path",
  25.     "file.separator",
  26.     "path.separator",
  27.     "user.name",
  28.     "user.home",
  29.     "user.dir",
  30.     "java.version",
  31.     "java.vendor",
  32.     "java.class.version",
  33.     "os.name",
  34.     "os.arch",
  35.     "os.version",
  36.     "java.sys.class.path"
  37.   };
  38.  
  39.   public static void main(String[] args){
  40.     for(int i=0;i<vars.length;i++){
  41.       System.out.println(vars[i]+" = "+System.getProperty(vars[i]));
  42.     }
  43.   }
  44. }
  45.