/** Prints JNA library details to the console. */ public static void main(String[] args) { final String DEFAULT_TITLE = "Java Native Access (JNA)"; final String DEFAULT_VERSION = VERSION; final String DEFAULT_BUILD = VERSION + " (package information missing)"; Package pkg = Native.class.getPackage(); String title = pkg != null ? pkg.getSpecificationTitle() : DEFAULT_TITLE; if (title == null) title = DEFAULT_TITLE; String version = pkg != null ? pkg.getSpecificationVersion() : DEFAULT_VERSION; if (version == null) version = DEFAULT_VERSION; title += " API Version " + version; System.out.println(title); version = pkg != null ? pkg.getImplementationVersion() : DEFAULT_BUILD; if (version == null) version = DEFAULT_BUILD; System.out.println("Version: " + version); System.out.println(" Native: " + getNativeVersion() + " (" + getAPIChecksum() + ")"); System.out.println(" Prefix: " + Platform.RESOURCE_PREFIX); }
/** Prints JNA library details to the console. */ public static void main(String[] args) { Package pkg = Native.class.getPackage(); System.out.println(pkg.getSpecificationTitle()); System.out.println("Version: " + Native.class.getPackage().getImplementationVersion()); System.out.println(" Native: " + getNativeVersion() + " (" + getAPIChecksum() + ")"); System.exit(0); } }
/** Prints JNA library details to the console. */ public static void main(String[] args) { final String DEFAULT_TITLE = "Java Native Access (JNA)"; final String DEFAULT_VERSION = VERSION; final String DEFAULT_BUILD = VERSION + " (package information missing)"; Package pkg = Native.class.getPackage(); String title = pkg != null ? pkg.getSpecificationTitle() : DEFAULT_TITLE; if (title == null) title = DEFAULT_TITLE; String version = pkg != null ? pkg.getSpecificationVersion() : DEFAULT_VERSION; if (version == null) version = DEFAULT_VERSION; title += " API Version " + version; System.out.println(title); version = pkg != null ? pkg.getImplementationVersion() : DEFAULT_BUILD; if (version == null) version = DEFAULT_BUILD; System.out.println("Version: " + version); System.out.println(" Native: " + getNativeVersion() + " (" + getAPIChecksum() + ")"); System.out.println(" Prefix: " + Platform.RESOURCE_PREFIX); }