MCPcopy Create free account
hub / github.com/java-native-access/jna / main

Method main

src/com/sun/jna/Native.java:2161–2181  ·  view source on GitHub ↗

Prints JNA library details to the console.

(String[] args)

Source from the content-addressed store, hash-verified

2159
2160 /** Prints JNA library details to the console. */
2161 public static void main(String[] args) {
2162 final String DEFAULT_TITLE = "Java Native Access (JNA)";
2163 final String DEFAULT_VERSION = VERSION;
2164 final String DEFAULT_BUILD = VERSION + " (package information missing)";
2165 Package pkg = Native.class.getPackage();
2166 String title = pkg != null
2167 ? pkg.getSpecificationTitle() : DEFAULT_TITLE;
2168 if (title == null) title = DEFAULT_TITLE;
2169 String version = pkg != null
2170 ? pkg.getSpecificationVersion() : DEFAULT_VERSION;
2171 if (version == null) version = DEFAULT_VERSION;
2172 title += " API Version " + version;
2173 System.out.println(title);
2174 version = pkg != null
2175 ? pkg.getImplementationVersion() : DEFAULT_BUILD;
2176 if (version == null) version = DEFAULT_BUILD;
2177 System.out.println("Version: " + version);
2178 System.out.println(" Native: " + getNativeVersion() + " ("
2179 + getAPIChecksum() + ")");
2180 System.out.println(" Prefix: " + Platform.RESOURCE_PREFIX);
2181 }
2182
2183 /** Free the given callback trampoline. */
2184 static synchronized native void freeNativeCallback(long ptr);

Callers

nothing calls this directly

Calls 3

getNativeVersionMethod · 0.95
getAPIChecksumMethod · 0.95
getPackageMethod · 0.45

Tested by

no test coverage detected