Prints JNA library details to the console.
(String[] args)
| 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); |
nothing calls this directly
no test coverage detected