test/native_sanity/JniVersion.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
JNI_hotspot.01 Cdiff test/native_sanity/JniVersion.java
test/native_sanity/JniVersion.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2015, 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.
--- 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 ****
* @test
* @run main/native JniVersion
*/
public class JniVersion {
! public static final int JNI_VERSION_1_8 = 0x00010008;
public static void main(String... args) throws Exception {
System.loadLibrary("JniVersion");
int res = getJniVersion();
! if (res < JNI_VERSION_1_8) {
throw new Exception("Unexpected value returned from getJniVersion(): 0x" + Integer.toHexString(res));
}
}
static native int getJniVersion();
--- 25,40 ----
* @test
* @run main/native JniVersion
*/
public class JniVersion {
! 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_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