/** * If the native system is both {@link #isNativeSystemInfoAvailable() available} and * {@link #isNativeSystemInfoDisabled() enabled}, this will return the native system's version string. Otherwise, a * generic Java version message is returned. * * @return native system version string */ public static synchronized String getNativeSystemInfoVersion() { String version = null; Throwable error = null; initialize(); // make sure we've loaded the native libraries, if appropriate if (!isNativeSystemInfoDisabled() && isNativeSystemInfoAvailable()) { try { version = "Version=" + invokeApi(NativeApi.VERSION_STRING) + " (" + invokeApi(NativeApi.BUILD_DATE) + "); Native version=" + invokeApi(NativeApi.NATIVE_VERSION_STRING) + " (" + invokeApi(NativeApi.NATIVE_BUILD_DATE) + ")"; } catch (Throwable t) { error = t; } } if (version == null) { version = "Native system not supported - Java version is " + System.getProperty("java.version"); if (error != null) { version += " : " + error; } } return version; }
/** * If the native system is both {@link #isNativeSystemInfoAvailable() available} and * {@link #isNativeSystemInfoDisabled() enabled}, this will return the native system's version string. Otherwise, a * generic Java version message is returned. * * @return native system version string */ public static synchronized String getNativeSystemInfoVersion() { String version = null; Throwable error = null; initialize(); // make sure we've loaded the native libraries, if appropriate if (!isNativeSystemInfoDisabled() && isNativeSystemInfoAvailable()) { try { version = "Version=" + invokeApi(NativeApi.VERSION_STRING) + " (" + invokeApi(NativeApi.BUILD_DATE) + "); Native version=" + invokeApi(NativeApi.NATIVE_VERSION_STRING) + " (" + invokeApi(NativeApi.NATIVE_BUILD_DATE) + ")"; } catch (Throwable t) { error = t; } } if (version == null) { version = "Native system not supported - Java version is " + System.getProperty("java.version"); if (error != null) { version += " : " + error; } } return version; }
nativeApis.put(NativeApi.NATIVE_BUILD_DATE, clazz.getField(NativeApi.NATIVE_BUILD_DATE.name())); invokeApi(NativeApi.load);
nativeApis.put(NativeApi.NATIVE_BUILD_DATE, clazz.getField(NativeApi.NATIVE_BUILD_DATE.name())); invokeApi(NativeApi.load);