From 090aaeb2cef77191a3bc486a879441cfd6db47b8 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Wed, 10 Feb 2016 09:35:57 -0600 Subject: [PATCH] add optional java 9 support --- .../library/serverScript/src/shared/JavaLibrary.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/engine/server/library/serverScript/src/shared/JavaLibrary.cpp b/engine/server/library/serverScript/src/shared/JavaLibrary.cpp index 69712e48..0023408c 100755 --- a/engine/server/library/serverScript/src/shared/JavaLibrary.cpp +++ b/engine/server/library/serverScript/src/shared/JavaLibrary.cpp @@ -1255,11 +1255,19 @@ void JavaLibrary::initializeJavaThread() tempOption.optionString = const_cast(classPath.c_str()); options.push_back(tempOption); -#ifdef JNI_VERSION_1_8 - vm_args.version = JNI_VERSION_1_8; +// the below is ok but could use the dynamic function call too if we want someday +#ifdef JNI_VERSION_1_9 + vm_args.version = JNI_VERSION_1_9; #define JAVAVERSET = 1 #endif +#ifndef JAVAVERSET +#ifdef JNI_VERSION_1_8 + vm_args.version = JNI_VERSION_1_8; +#define JAVAVERSET = 1 +#endif +#endif + #ifndef JAVAVERSET #ifdef JNI_VERSION_1_7 vm_args.version = JNI_VERSION_1_7;