List of usage examples for java.lang Package getImplementationVendor
public String getImplementationVendor()
From source file:Main.java
public static void main(String[] args) { // create a package object for java.lang package Package pack = Package.getPackage("java.lang"); // get the implementation vendor System.out.println(pack.getImplementationVendor()); }
From source file:Main.java
public static void main(String[] a) { Package p = Package.getPackage("java.lang"); System.out.println("Name = " + p.getName()); System.out.println("Implementation title = " + p.getImplementationTitle()); System.out.println("Implementation vendor = " + p.getImplementationVendor()); System.out.println("Implementation version = " + p.getImplementationVersion()); }
From source file:PackageInfo.java
public static void main(String[] args) { Package p = Package.getPackage("java.lang"); System.out.println("Name = " + p.getName()); System.out.println("Implementation title = " + p.getImplementationTitle()); System.out.println("Implementation vendor = " + p.getImplementationVendor()); System.out.println("Implementation version = " + p.getImplementationVersion()); System.out.println("Specification title = " + p.getSpecificationTitle()); System.out.println("Specification vendor = " + p.getSpecificationVendor()); System.out.println("Specification version = " + p.getSpecificationVersion()); }
From source file:PackageInfo.java
static void pkgInfo(ClassLoader classLoader, String pkgName, String className) { try {/* w ww . java 2 s . c om*/ classLoader.loadClass(pkgName + "." + className); Package p = Package.getPackage(pkgName); if (p == null) { System.out.println("WARNING: Package.getPackage(" + pkgName + ") is null"); } else { System.out.println(p); System.out.println("Specification Title = " + p.getSpecificationTitle()); System.out.println("Specification Vendor = " + p.getSpecificationVendor()); System.out.println("Specification Version = " + p.getSpecificationVersion()); System.out.println("Implementation Vendor = " + p.getImplementationVendor()); System.out.println("Implementation Version = " + p.getImplementationVersion()); } } catch (ClassNotFoundException e) { System.out.println("Unable to load " + pkgName); } System.out.println(); }
From source file:com.github.wolf480pl.mias4j.core.runtime.BMClassLoader.java
protected Package copyPackage(Package pkg, CodeSource cs) { return definePackage(pkg.getName(), pkg.getSpecificationTitle(), pkg.getSpecificationVersion(), pkg.getSpecificationVendor(), pkg.getImplementationTitle(), pkg.getImplementationVersion(), pkg.getImplementationVendor(), pkg.isSealed() ? cs.getLocation() : null); }
From source file:adalid.util.info.JavaInfo.java
public void printPackageDetails(String name) { Package pack = Package.getPackage(name); out.println("Package " + name + ": " + pack); if (pack != null) { out.println("\t" + Attributes.Name.IMPLEMENTATION_TITLE + ": " + pack.getImplementationTitle()); out.println("\t" + Attributes.Name.IMPLEMENTATION_VENDOR + ": " + pack.getImplementationVendor()); out.println("\t" + Attributes.Name.IMPLEMENTATION_VERSION + ": " + pack.getImplementationVersion()); out.println("\t" + Attributes.Name.SPECIFICATION_TITLE + ": " + pack.getSpecificationTitle()); out.println("\t" + Attributes.Name.SPECIFICATION_VENDOR + ": " + pack.getSpecificationVendor()); out.println("\t" + Attributes.Name.SPECIFICATION_VERSION + ": " + pack.getSpecificationVersion()); out.println();/*from ww w .jav a 2 s . c o m*/ } }
From source file:com.norconex.collector.core.AbstractCollector.java
private void printReleaseVersion(String moduleName, Package p) { String version = p.getImplementationVersion(); if (StringUtils.isBlank(version)) { // No version is likely due to using an unpacked or modified // jar, or the jar not being packaged with version // information. LOG.info("Version: \"" + moduleName + "\" version is undefined."); return;//from w ww . ja v a2 s.co m } LOG.info("Version: " + p.getImplementationTitle() + " " + p.getImplementationVersion() + " (" + p.getImplementationVendor() + ")"); }
From source file:net.chaosserver.timelord.swingui.Timelord.java
/** * Shows the about dialog that tells about the application. *//*from w w w. j av a2s.c om*/ public void showAboutDialog() { Package packageInfo = Package.getPackage("net.chaosserver.timelord.swingui"); if (log.isTraceEnabled()) { if (packageInfo != null) { StringBuffer sb = new StringBuffer(); sb.append(packageInfo.getClass().getName()); sb.append(" [name="); sb.append(packageInfo.getName()); sb.append(", specificationTitle="); sb.append(packageInfo.getSpecificationTitle()); sb.append(", specificationVersion="); sb.append(packageInfo.getSpecificationVersion()); sb.append(", specificationVendor="); sb.append(packageInfo.getSpecificationVendor()); sb.append(", implementationTitle="); sb.append(packageInfo.getImplementationTitle()); sb.append(", implementationVersion="); sb.append(packageInfo.getImplementationVersion()); sb.append(", implementationVendor="); sb.append(packageInfo.getImplementationVendor()); sb.append("]"); log.trace(sb.toString()); } } StringBuffer sb = new StringBuffer(); sb.append("Timelord"); if ((packageInfo != null) && (packageInfo.getImplementationVersion() != null)) { sb.append(" ["); sb.append(packageInfo.getImplementationVersion()); sb.append("]"); } else { Properties appProperties = getAppProperties(); if (appProperties != null) { sb.append(" "); sb.append(appProperties.getProperty("implementation.version", "[Unknown Version]")); } else { sb.append(" [Unknown Version]"); } } sb.append("\n"); sb.append(resourceBundle.getString(RROOT + ".about")); JOptionPane.showMessageDialog(applicationFrame, sb.toString(), "About Timelord", JOptionPane.INFORMATION_MESSAGE, applicationIcon); }