--- old/make/launcher/LauncherCommon.gmk Thu Jun 8 07:36:01 2017 +++ new/make/launcher/LauncherCommon.gmk Thu Jun 8 07:36:01 2017 @@ -67,8 +67,9 @@ # current module # MAIN_CLASS The Java main class to launch # JAVA_ARGS Processed into a -DJAVA_ARGS and added to CFLAGS -# EXTRA_JAVA_ARGS Processed into a -DEXTRA_JAVA_ARGS and is prependedi -# before JAVA_ARGS to CFLAGS +# EXTRA_JAVA_ARGS Processed into a -DEXTRA_JAVA_ARGS and is prepended +# before JAVA_ARGS to CFLAGS, primarily to allow long string literal +# compile time defines exceeding Visual Studio 2013 limitations. # CFLAGS Additional CFLAGS # CFLAGS_windows Additional CFLAGS_windows # LIBS_unix Additional LIBS_unix --- old/src/java.base/share/native/launcher/defines.h Thu Jun 8 07:36:02 2017 +++ new/src/java.base/share/native/launcher/defines.h Thu Jun 8 07:36:02 2017 @@ -56,6 +56,9 @@ static const char** const_extra_jargs = NULL; #endif #else /* !JAVA_ARGS */ +#ifdef EXTRA_JAVA_ARGS +#error "EXTRA_JAVA_ARGS defined without JAVA_ARGS" +#endif static const char* const_progname = "java"; static const char** const_jargs = NULL; static const char** const_extra_jargs = NULL; --- old/src/java.base/share/native/launcher/main.c Thu Jun 8 07:36:03 2017 +++ new/src/java.base/share/native/launcher/main.c Thu Jun 8 07:36:03 2017 @@ -128,6 +128,9 @@ // terminate the list JLI_List_add(list, NULL); jargv = list->elements; + } else if (extra_jargc > 0) { // should never happen + fprintf(stderr, "EXTRA_JAVA_ARGS defined without JAVA_ARGS"); + abort(); } else { // no extra args, business as usual jargc = main_jargc; jargv = (char **) const_jargs;