home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / ShowSystemProperties.java < prev    next >
Text File  |  1998-09-27  |  2KB  |  66 lines

  1. package com.symantec.itools.tools.utilities;
  2.  
  3.  
  4. import java.applet.Applet;
  5. import java.util.Enumeration;
  6. import java.util.Properties;
  7.  
  8.  
  9. /**
  10.  * @author Symantec Internet Tools Division
  11.  * @version 1.0
  12.  * @since VCafe 3.0
  13.  */
  14.  
  15. public class ShowSystemProperties
  16.     extends Applet
  17. {
  18.     public ShowSystemProperties()
  19.     {
  20.     }
  21.     
  22.     /**
  23.      * @since VCafe 3.0
  24.      */
  25.     public void init()
  26.     {
  27.         Properties  properties;
  28.  
  29.         try
  30.         {
  31.             properties = System.getProperties();
  32.  
  33.             for(Enumeration keys = properties.keys(); keys.hasMoreElements();)
  34.             {
  35.                 String key;
  36.  
  37.                 key = (String)keys.nextElement();
  38.                     
  39.                 if(!(key.equals("java.class.path")))
  40.                 {
  41.                     try
  42.                     {
  43.                         System.out.println(key + " = " + properties.get(key));
  44.                     }
  45.                     catch(SecurityException ex)
  46.                     {
  47.                         System.out.println("Security Excpetion for key: " + key);
  48.                     }                            
  49.                 }
  50.             }
  51.         }
  52.         catch(SecurityException ex)
  53.         {
  54.             System.out.println("Security Excpetion: Cannot access System.getProperties()");
  55.         }                            
  56.     }
  57.  
  58.     /**
  59.      * @param argv TODO
  60.      * @since VCafe 3.0
  61.      */
  62.     public static void main(String[] argv)
  63.     {
  64.         new ShowSystemProperties().init();
  65.     }
  66. }