Get package Implementation Version in Java
Description
The following code shows how to get package Implementation Version.
Example
// www .j a va 2 s .c o m
public class Main {
public static void main(String args[]) {
Package[] pkgs = Package.getPackages();
for(int i=0; i < pkgs.length; i++)
System.out.println(
pkgs[i].getName() + " " +
pkgs[i].getImplementationVersion()
);
}
}
The code above generates the following result.