test/native_sanity/JniVersion.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/test/native_sanity/JniVersion.java Wed Feb 17 11:52:30 2016
--- new/test/native_sanity/JniVersion.java Wed Feb 17 11:52:29 2016
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 25,40 ****
--- 25,40 ----
* @test
* @run main/native JniVersion
*/
public class JniVersion {
! public static final int JNI_VERSION_1_8 = 0x00010008;
! public static final int JNI_VERSION_9 = 0x00090000;
public static void main(String... args) throws Exception {
System.loadLibrary("JniVersion");
int res = getJniVersion();
! if (res < JNI_VERSION_1_8) {
! if (res != JNI_VERSION_9) {
throw new Exception("Unexpected value returned from getJniVersion(): 0x" + Integer.toHexString(res));
}
}
static native int getJniVersion();
test/native_sanity/JniVersion.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File