* src/native/jni.cpp (JNI_GetDefaultJavaVMInitArgs): Now accepts above version
number.
{
TRACEJNICALLS(("_Jv_JNI_GetVersion(env=%p)", env));
{
TRACEJNICALLS(("_Jv_JNI_GetVersion(env=%p)", env));
- /* We support JNI 1.6. */
-
- return JNI_VERSION_1_6;
+ return JNI_VERSION_SUPPORTED;
/* GNU classpath currently supports JNI 1.2 */
switch (_vm_args->version) {
/* GNU classpath currently supports JNI 1.2 */
switch (_vm_args->version) {
_vm_args->version = JNI_VERSION_1_1;
break;
_vm_args->version = JNI_VERSION_1_1;
break;
- case JNI_VERSION_1_2:
- case JNI_VERSION_1_4:
+ case JNI_VERSION_1_2:
+ case JNI_VERSION_1_4:
_vm_args->ignoreUnrecognized = JNI_FALSE;
_vm_args->options = NULL;
_vm_args->nOptions = 0;
break;
_vm_args->ignoreUnrecognized = JNI_FALSE;
_vm_args->options = NULL;
_vm_args->nOptions = 0;
break;
+ case JNI_VERSION_CACAO:
+ // We reveal ourselves by accepting this version number,
+ // this actually means we are using the supported JNI version.
+ _vm_args->version = JNI_VERSION_SUPPORTED;
+ break;
+
+ default:
+ return JNI_ERR;
//#include "vm/javaobjects.hpp"
#include "vm/global.h"
//#include "vm/javaobjects.hpp"
#include "vm/global.h"
+
+// Some additional JNI version numbers, we currently support JNI 1.6.
+#define JNI_VERSION_SUPPORTED JNI_VERSION_1_6
+#define JNI_VERSION_CACAO 0xcaca0000
+
+
// Typedef the JNI types.
typedef java_handle_t* jobject;
typedef java_handle_t* jclass;
// Typedef the JNI types.
typedef java_handle_t* jobject;
typedef java_handle_t* jclass;