|
@@ -1,26 +1,26 @@
|
|
|
/*
|
|
|
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
|
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
- *
|
|
|
+ * Copyright (c) 1996, 2023, 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. 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.
|
|
|
*/
|
|
|
|
|
|
/*
|
|
@@ -36,10 +36,6 @@
|
|
|
#ifndef _JAVASOFT_JNI_H_
|
|
|
#define _JAVASOFT_JNI_H_
|
|
|
|
|
|
-#if defined(__ANDROID__)
|
|
|
-#error This is the Oracle JDK implementation of <jni.h>. Using it in Android builds is invalid. Please check your build configuration.
|
|
|
-#endif
|
|
|
-
|
|
|
#include <stdio.h>
|
|
|
#include <stdarg.h>
|
|
|
|
|
@@ -769,6 +765,16 @@ struct JNINativeInterface_ {
|
|
|
|
|
|
jobjectRefType (JNICALL *GetObjectRefType)
|
|
|
(JNIEnv* env, jobject obj);
|
|
|
+
|
|
|
+ /* Module Features */
|
|
|
+
|
|
|
+ jobject (JNICALL *GetModule)
|
|
|
+ (JNIEnv* env, jclass clazz);
|
|
|
+
|
|
|
+ /* Virtual threads */
|
|
|
+
|
|
|
+ jboolean (JNICALL *IsVirtualThread)
|
|
|
+ (JNIEnv* env, jobject obj);
|
|
|
};
|
|
|
|
|
|
/*
|
|
@@ -1861,9 +1867,35 @@ struct JNIEnv_ {
|
|
|
return functions->GetObjectRefType(this, obj);
|
|
|
}
|
|
|
|
|
|
+ /* Module Features */
|
|
|
+
|
|
|
+ jobject GetModule(jclass clazz) {
|
|
|
+ return functions->GetModule(this, clazz);
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Virtual threads */
|
|
|
+
|
|
|
+ jboolean IsVirtualThread(jobject obj) {
|
|
|
+ return functions->IsVirtualThread(this, obj);
|
|
|
+ }
|
|
|
+
|
|
|
#endif /* __cplusplus */
|
|
|
};
|
|
|
|
|
|
+/*
|
|
|
+ * optionString may be any option accepted by the JVM, or one of the
|
|
|
+ * following:
|
|
|
+ *
|
|
|
+ * -D<name>=<value> Set a system property.
|
|
|
+ * -verbose[:class|gc|jni] Enable verbose output, comma-separated. E.g.
|
|
|
+ * "-verbose:class" or "-verbose:gc,class"
|
|
|
+ * Standard names include: gc, class, and jni.
|
|
|
+ * All nonstandard (VM-specific) names must begin
|
|
|
+ * with "X".
|
|
|
+ * vfprintf extraInfo is a pointer to the vfprintf hook.
|
|
|
+ * exit extraInfo is a pointer to the exit hook.
|
|
|
+ * abort extraInfo is a pointer to the abort hook.
|
|
|
+ */
|
|
|
typedef struct JavaVMOption {
|
|
|
char *optionString;
|
|
|
void *extraInfo;
|
|
@@ -1956,6 +1988,11 @@ JNI_OnUnload(JavaVM *vm, void *reserved);
|
|
|
#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
|
|
|
+#define JNI_VERSION_19 0x00130000
|
|
|
+#define JNI_VERSION_20 0x00140000
|
|
|
+#define JNI_VERSION_21 0x00150000
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
} /* extern "C" */
|