Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2007-01-19 21:11:48 +0000
committerAndrew Niefer2007-01-19 21:11:48 +0000
commit1a0ef36ae9f69561b240c5191040b1411e9e2777 (patch)
tree813d2c4f6e9c615dae34118c41a8af651821e358 /bundles/org.eclipse.equinox.executable/library/eclipse.c
parent435198d2fb3fea69d034957ce8595a7284d5301d (diff)
downloadrt.equinox.framework-1a0ef36ae9f69561b240c5191040b1411e9e2777.tar.gz
rt.equinox.framework-1a0ef36ae9f69561b240c5191040b1411e9e2777.tar.xz
rt.equinox.framework-1a0ef36ae9f69561b240c5191040b1411e9e2777.zip
changes for 168775
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/eclipse.c')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipse.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipse.c b/bundles/org.eclipse.equinox.executable/library/eclipse.c
index c034e7306..90b3d6e71 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipse.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipse.c
@@ -213,6 +213,7 @@ static _TCHAR* javaVM = NULL; /* full pathname of the Java VM to run
static _TCHAR* jniLib = NULL; /* full path of a java vm library for JNI invocation */
static _TCHAR* jarFile = NULL; /* full pathname of the startup jar file to run */
static _TCHAR* sharedID = NULL; /* ID for the shared memory */
+static _TCHAR* officialName = NULL;
_TCHAR* exitData = NULL; /* exit data set from Java */
int initialArgc;
@@ -349,8 +350,7 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
parseArgs( &argc, argv );
/* Initialize official program name */
- if (officialName != NULL)
- officialName = name != NULL ? _tcsdup( name ) : getDefaultOfficialName();
+ officialName = name != NULL ? _tcsdup( name ) : getDefaultOfficialName();
/* Initialize the window system. */
initWindowSystem( &argc, argv, !noSplash );
@@ -394,6 +394,10 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
/* Either verify the VM specified by the user or
attempt to find the VM in the user's PATH. */
javaVM = findCommand( vmName );
+#ifdef DEFAULT_JAVA_EXEC
+ /* if the default is exe, only do jnilaunching if a library was specified */
+ jniLaunching = isVMLibrary(javaVM);
+#endif
}
if(jniLaunching) {
@@ -556,6 +560,7 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
free( jarFile );
free( programDir );
free( program );
+ free( officialName );
if ( vmCommand != NULL ) free( vmCommand );
if ( cp != JAR ) free( cp );
if ( cpValue != NULL) free( cpValue );
@@ -840,6 +845,10 @@ static _TCHAR* formatVmCommandMsg( _TCHAR* args[], _TCHAR* vmArgs[], _TCHAR* pr
return message;
}
+_TCHAR* getOfficialName() {
+ return officialName;
+}
+
/*
* Determine the default official application name
*
@@ -1002,6 +1011,8 @@ static _TCHAR ** getRelaunchCommand( _TCHAR **vmCommand )
}
relaunch[idx++] = vmCommand[i];
}
+ if(_tcsicmp(relaunch[idx - 1], VMARGS) == 0)
+ relaunch[idx - 1] = NULL;
relaunch[idx] = NULL;
return relaunch;
}

Back to the top