< prev index next >

test/hotspot/jtreg/native_sanity/JniVersion.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2015, 2024, 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, 2026, 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,16 ***
   * @test
   * @run main/native JniVersion
   */
  public class JniVersion {
  
!     public static final int JNI_VERSION_24 = 0x00180000;
  
      public static void main(String... args) throws Exception {
          System.loadLibrary("JniVersion");
          int res = getJniVersion();
!         if (res != JNI_VERSION_24) {
              throw new Exception("Unexpected value returned from getJniVersion(): 0x" + Integer.toHexString(res));
          }
      }
  
      static native int getJniVersion();
--- 25,16 ---
   * @test
   * @run main/native JniVersion
   */
  public class JniVersion {
  
!     public static final int JNI_VERSION_28 = 0x001C0000;
  
      public static void main(String... args) throws Exception {
          System.loadLibrary("JniVersion");
          int res = getJniVersion();
!         if (res != JNI_VERSION_28) {
              throw new Exception("Unexpected value returned from getJniVersion(): 0x" + Integer.toHexString(res));
          }
      }
  
      static native int getJniVersion();
< prev index next >