/*
* Output:
java.lang Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.net Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.misc Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset.spi Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.concurrent.atomic Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.ref Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio.cs Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.zip Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.annotation Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.file Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.management Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security.cert Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.action Java Runtime Environment Sun Microsystems, Inc. 1.5.0
*
*/
public class MainClass {
public static void main(String args[]) {
Package pkgs[];
pkgs = Package.getPackages();
for(int i=0; i < pkgs.length; i++)
System.out.println(
pkgs[i].getName() + " " +
pkgs[i].getImplementationTitle() + " " +
pkgs[i].getImplementationVendor() + " " +
pkgs[i].getImplementationVersion()
);
}
}
|