Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2017-05-10 20:20:00 +0000
committerArun Thondapu2017-05-11 11:32:46 +0000
commitad13b29e1e8388dda5021e3c10824aa5c44d2e2a (patch)
tree93c4c405a5f40fee5590bee290b94d63c92e9089 /features/org.eclipse.equinox.executable.feature
parent380bd66fdf3e4cfa35e3a2ee0d81a99456bd42d1 (diff)
downloadrt.equinox.framework-ad13b29e1e8388dda5021e3c10824aa5c44d2e2a.tar.gz
rt.equinox.framework-ad13b29e1e8388dda5021e3c10824aa5c44d2e2a.tar.xz
rt.equinox.framework-ad13b29e1e8388dda5021e3c10824aa5c44d2e2a.zip
Bug 516349 - [Mac] Cannot Restart on Java 9-ea builds
(NoClassDefFoundError: javax/annotation/PostConstruct) Change-Id: I3eba0c07f9a53aaf212050d6594ceacea91855e2 Signed-off-by: Till Brychcy <register.eclipse@brychcy.de>
Diffstat (limited to 'features/org.eclipse.equinox.executable.feature')
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipse.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
index e927af2c9..bb709358d 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
@@ -230,6 +230,7 @@ home directory.");
#define EXITDATA _T_ECLIPSE("-exitdata")
#define STARTUP _T_ECLIPSE("-startup")
#define VM _T_ECLIPSE("-vm")
+#define MODULARVM _T_ECLIPSE("-modularVM")
#define WS _T_ECLIPSE("-ws")
#define NAME _T_ECLIPSE("-name")
#define VMARGS _T_ECLIPSE("-vmargs") /* special option processing required */
@@ -271,6 +272,7 @@ static int noSplash = 0; /* True: do not show splash win */
static int suppressErrors = 0; /* True: do not display errors dialogs */
int secondThread = 0; /* True: start the VM on a second thread */
static int appendVmargs = 0; /* True: append cmdline vmargs to launcher.ini vmargs */
+static int modularVM = 0; /* True: is known to be Java 9 or later */
static _TCHAR* showSplashArg = NULL; /* showsplash data (main launcher window) */
static _TCHAR* splashBitmap = NULL; /* the actual splash bitmap */
@@ -315,6 +317,7 @@ static Option options[] = {
{ CONSOLE, &needConsole, VALUE_IS_FLAG, 0 },
{ CONSOLELOG, &needConsole, VALUE_IS_FLAG, 0 },
{ DEBUG, &debug, VALUE_IS_FLAG, 0 },
+ { MODULARVM, &modularVM, VALUE_IS_FLAG, 1},
{ NOSPLASH, &noSplash, VALUE_IS_FLAG, 1 },
{ SUPRESSERRORS, &suppressErrors, VALUE_IS_FLAG, 1},
{ SECOND_THREAD, &secondThread, VALUE_IS_FLAG, 1 },
@@ -1040,7 +1043,10 @@ static void adjustVMArgs(_TCHAR *javaVM, _TCHAR *jniLib, _TCHAR **vmArgv[]) {
int i = 0;
- if (!isModularVM(javaVM, jniLib)) {
+ if(!modularVM) {
+ modularVM = isModularVM(javaVM, jniLib);
+ }
+ if (!modularVM) {
while ((*vmArgv)[i] != NULL) {
if (_tcsncmp((*vmArgv)[i], ADDMODULES, _tcslen(ADDMODULES)) == 0 || _tcsncmp((*vmArgv)[i], PERMIT_ILLEGAL_ACCESS, _tcslen(PERMIT_ILLEGAL_ACCESS)) == 0) {
int j = 0, k = 0;
@@ -1140,7 +1146,7 @@ static void getVMCommand( int launchMode, int argc, _TCHAR* argv[], _TCHAR **vmA
* VMARGS + vmArg + requiredVMargs
* + NULL)
*/
- totalProgArgs = 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 1 + argc + 2 + 1 + nVMarg + nEEargs + nReqVMarg + 1;
+ totalProgArgs = 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 1 + argc + 2 + 1 + nVMarg + nEEargs + nReqVMarg + 1 + (modularVM ? 1 : 0);
*progArgv = malloc( totalProgArgs * sizeof( _TCHAR* ) );
dst = 0;
@@ -1207,6 +1213,9 @@ static void getVMCommand( int launchMode, int argc, _TCHAR* argv[], _TCHAR **vmA
(*progArgv)[ dst++ ] = jniLib;
else
(*progArgv)[ dst++ ] = javaVM;
+ if(modularVM) {
+ (*progArgv)[ dst++ ] = MODULARVM;
+ }
(*progArgv)[ dst++ ] = VMARGS;
for (src = 0; src < nVMarg; src++)

Back to the top