/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package testpackages; import java.util.Arrays; /** * * @author mike */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { System.out.println( "Prop : " + System.getProperty("java.specification.version")); Package[] allPackages = Package.getPackages(); for(Package each : Arrays.asList(allPackages)) { System.out.println( each.getName() + " : " + each.getSpecificationVersion() ); } } }