jni-rs / jni-sys

Apache License 2.0
53 stars 19 forks source link

Add version constants for Java 9 and 10 #9

Closed marschall closed 5 years ago

marschall commented 5 years ago

The constants JNI_VERSION_9 and JNI_VERSION_10 are missing.

I checked two different Java 11 versions and could not find a constant for Java 11.

dmitry-timofeev commented 5 years ago

It seems the only things added since 8 are those constants and GetModule method:

Diff ``` --- /home/dmitry/bin/jdk-11.0.1/include/jni.h 2018-10-06 15:17:09.000000000 +0300 +++ /home/dmitry/bin/jdk1.8.0_191/include/jni.h 2018-10-06 15:52:43.000000000 +0300 @@ -1,26 +1,26 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * - * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. */ /* @@ -765,11 +765,6 @@ jobjectRefType (JNICALL *GetObjectRefType) (JNIEnv* env, jobject obj); - - /* Module Features */ - - jobject (JNICALL *GetModule) - (JNIEnv* env, jclass clazz); }; /* @@ -1862,12 +1857,6 @@ return functions->GetObjectRefType(this, obj); } - /* Module Features */ - - jobject GetModule(jclass clazz) { - return functions->GetModule(this, clazz); - } - #endif /* __cplusplus */ }; @@ -1963,8 +1952,6 @@ #define JNI_VERSION_1_4 0x00010004 #define JNI_VERSION_1_6 0x00010006 #define JNI_VERSION_1_8 0x00010008 -#define JNI_VERSION_9 0x00090000 -#define JNI_VERSION_10 0x000a0000 #ifdef __cplusplus } /* extern "C" */ ```
sfackler commented 5 years ago

Thanks!