Listing all System properties in Java

import java.util.*;
 
public class Main
{
   public static void main(String[] args) {
      Properties props = System.getProperties();
      
      Enumeration enum = props.propertyNames();
      while (enum.hasMoreElements()) {
         String prop = (String) enum.nextElement();
         printInColumn(prop, 40);
         printInColumn(System.getProperty(prop), 39);
         System.out.println();
      }
   }
 
   public static void printInColumn(String s, int col) {
      if (s.length() > col-2) s = s.substring(0, col-2);
      System.out.print(s);
      for (int i=s.length(); i<col; ++i)
         System.out.print(" ");
   }
}

outputs:

java.specification.name                 Java Platform API Specification        
awt.toolkit                             sun.awt.windows.WToolkit               
java.version                            1.2.2                                  
java.awt.graphicsenv                    sun.awt.Win32GraphicsEnvironment       
user.timezone                           Europe/Paris                           
java.specification.version              1.2                                    
java.vm.vendor                          Sun Microsystems Inc.                  
user.home                               C:WINDOWS                             
java.vm.specification.version           1.0                                    
os.arch                                 x86                                    
java.awt.fonts                                                                 
java.vendor.url                         http://java.sun.com/                   
user.region                             US                                     
file.encoding.pkg                       sun.io                                 
java.home                               C:JDK1.2.2JRE                        
java.class.path                         ;c:java  
line.separator                          
                                     
java.ext.dirs                           C:JDK1.2.2JRElibext                
java.io.tmpdir                          c:windowsTEMP                       
os.name                                 Windows 95                             
java.vendor                             Sun Microsystems Inc.                  
java.awt.printerjob                     sun.awt.windows.WPrinterJob            
java.library.path                       C:JDK1.2.2BIN;.;C:WINDOWSSYSTEM;C  
java.vm.specification.vendor            Sun Microsystems Inc.                  
sun.io.unicode.encoding                 UnicodeLittle                          
file.encoding                           Cp1252                                 
java.specification.vendor               Sun Microsystems Inc.                  
user.language                           en                                     
user.name                               joris                                  
java.vendor.url.bug                     http://java.sun.com/cgi-bin/bugreport  
java.vm.name                            Classic VM                             
java.class.version                      46.0                                   
java.vm.specification.name              Java Virtual Machine Specification     
sun.boot.library.path                   C:JDK1.2.2JREbin                    
os.version                              4.10                                   
java.vm.version                         1.2.2                                  
java.vm.info                            build JDK-1.2.2_005, native threads,   
java.compiler                           symcjit                                
path.separator                          ;                                      
file.separator                                                                
user.dir                                C:My DocumentsVisual Studio Project  
sun.boot.class.path                     C:JDK1.2.2JRElibrt.jar;C:JDK1.2.