View | Details | Raw Unified | Return to bug 167310
Collapse All | Expand All

(-)library/gtk/eclipseGtk.c (-1 lines)
Lines 36-42 Link Here
36
#include <gdk-pixbuf/gdk-pixbuf.h>
36
#include <gdk-pixbuf/gdk-pixbuf.h>
37
37
38
/* Global Variables */
38
/* Global Variables */
39
char*  consoleVM     = "java";
40
char*  defaultVM     = "java";
39
char*  defaultVM     = "java";
41
char*  vmLibrary 	 = "libjvm.so";
40
char*  vmLibrary 	 = "libjvm.so";
42
char*  shippedVMDir  = "jre/bin/";
41
char*  shippedVMDir  = "jre/bin/";
(-)library/motif/eclipseMotif.c (-1 lines)
Lines 41-47 Link Here
41
#include <stdlib.h>
41
#include <stdlib.h>
42
42
43
/* Global Variables */
43
/* Global Variables */
44
char*  consoleVM     = "java";
45
char*  defaultVM     = "java";
44
char*  defaultVM     = "java";
46
char*  shippedVMDir  = "jre/bin/";
45
char*  shippedVMDir  = "jre/bin/";
47
46
(-)library/eclipse.c (-8 / +45 lines)
Lines 185-190 Link Here
185
185
186
#ifdef _WIN32
186
#ifdef _WIN32
187
#include <direct.h>
187
#include <direct.h>
188
#include <io.h>
189
#include <fcntl.h>
188
#else
190
#else
189
#include <unistd.h>
191
#include <unistd.h>
190
#include <strings.h>
192
#include <strings.h>
Lines 289-309 Link Here
289
static int optionsSize = (sizeof(options) / sizeof(options[0]));
291
static int optionsSize = (sizeof(options) / sizeof(options[0]));
290
292
291
/* Define the required VM arguments (all platforms). */
293
/* Define the required VM arguments (all platforms). */
292
static _TCHAR* cp = NULL;
294
static _TCHAR*  cp = NULL;
293
static _TCHAR** reqVMarg[] = { &cp, NULL };		/* required VM args */
295
static _TCHAR** reqVMarg[] = { &cp, NULL };		/* required VM args */
294
static _TCHAR** userVMarg     = NULL;     		/* user specific args for the Java VM  */
296
static _TCHAR** userVMarg     = NULL;     		/* user specific args for the Java VM  */
295
297
296
/* Local methods */
298
/* Local methods */
297
static void   parseArgs( int* argc, _TCHAR* argv[] );
299
static void     parseArgs( int* argc, _TCHAR* argv[] );
300
static void     freeArgList( _TCHAR** data );
301
static void     getVMCommand( int argc, _TCHAR* argv[], _TCHAR **vmArgv[], _TCHAR **progArgv[] );
298
static _TCHAR** parseArgList( _TCHAR *data );
302
static _TCHAR** parseArgList( _TCHAR *data );
299
static void   freeArgList( _TCHAR** data );
300
static void getVMCommand( int argc, _TCHAR* argv[], _TCHAR **vmArgv[], _TCHAR **progArgv[] );
301
static _TCHAR*  formatVmCommandMsg( _TCHAR* args[] );
303
static _TCHAR*  formatVmCommandMsg( _TCHAR* args[] );
302
       _TCHAR*  getProgramDir();
304
static _TCHAR*  getDefaultOfficialName();
303
static _TCHAR* getDefaultOfficialName();
304
static _TCHAR*  findStartupJar();
305
static _TCHAR*  findStartupJar();
305
static _TCHAR ** getRelaunchCommand( _TCHAR **vmCommand );
306
static _TCHAR** getRelaunchCommand( _TCHAR **vmCommand );
306
307
308
#ifdef _WIN32
309
static void     createConsole();
310
#endif
307
311
308
/* Record the arguments that were used to start the original executable */
312
/* Record the arguments that were used to start the original executable */
309
JNIEXPORT void setInitialArgs(int argc, _TCHAR** argv) {
313
JNIEXPORT void setInitialArgs(int argc, _TCHAR** argv) {
Lines 354-360 Link Here
354
    if (vmName == NULL)
358
    if (vmName == NULL)
355
    {
359
    {
356
    	/* Determine which type of VM should be used. */
360
    	/* Determine which type of VM should be used. */
357
    	vmName = ((debug || needConsole) ? consoleVM : defaultVM);
361
    	vmName = defaultVM;
358
362
359
        /* Try to find the VM shipped with eclipse. */
363
        /* Try to find the VM shipped with eclipse. */
360
        shippedVM = malloc( (_tcslen( programDir ) + _tcslen( shippedVMDir ) + _tcslen( vmName ) + 10) * sizeof(_TCHAR) );
364
        shippedVM = malloc( (_tcslen( programDir ) + _tcslen( shippedVMDir ) + _tcslen( vmName ) + 10) * sizeof(_TCHAR) );
Lines 398-403 Link Here
398
    	exit( 1 );
402
    	exit( 1 );
399
	}
403
	}
400
404
405
#ifdef _WIN32
406
	if(debug || needConsole) {
407
		createConsole();
408
	}
409
#endif
401
    /* If the showsplash option was given */
410
    /* If the showsplash option was given */
402
    if (!noSplash && showSplashArg)
411
    if (!noSplash && showSplashArg)
403
    {
412
    {
Lines 885-887 Link Here
885
	relaunch[idx] = NULL;
894
	relaunch[idx] = NULL;
886
	return relaunch;
895
	return relaunch;
887
}
896
}
897
898
#ifdef _WIN32
899
static void createConsole() {
900
	long stdHandle;
901
	int conHandle;
902
	FILE *fp;
903
	
904
	AllocConsole();
905
	
906
	/* redirect stdout */
907
	stdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
908
	conHandle = _open_osfhandle(stdHandle, _O_TEXT);
909
	fp = _fdopen(conHandle, "w");
910
	*stdout = *fp;
911
	
912
	/* redirect stdin */
913
	stdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
914
	conHandle = _open_osfhandle(stdHandle, _O_TEXT);
915
	fp = _fdopen(conHandle, "r");
916
	*stdin = *fp;
917
	
918
	/* stderr */
919
	stdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
920
	conHandle = _open_osfhandle(stdHandle, _O_TEXT);
921
	fp = _fdopen(conHandle, "r");
922
	*stderr = *fp;	
923
}
924
#endif
(-)library/eclipseOS.h (-2 lines)
Lines 18-24 Link Here
18
#ifdef UNICODE
18
#ifdef UNICODE
19
#define shippedVMDir shippedVMDirW
19
#define shippedVMDir shippedVMDirW
20
#define defaultVM defaultVMW
20
#define defaultVM defaultVMW
21
#define consoleVM consoleVMW
22
#define initWindowSystem initWindowSystemW
21
#define initWindowSystem initWindowSystemW
23
#define showSplash showSplashW
22
#define showSplash showSplashW
24
#define getArgVM getArgVMW
23
#define getArgVM getArgVMW
Lines 37-43 Link Here
37
/*** See eclipse.c for information on the launcher runtime architecture ***/
36
/*** See eclipse.c for information on the launcher runtime architecture ***/
38
37
39
/* Global Variables */
38
/* Global Variables */
40
extern _TCHAR*  consoleVM;   			/* name of VM to use for debugging */
41
extern _TCHAR*  defaultVM;   			/* name of VM to use normally      */
39
extern _TCHAR*  defaultVM;   			/* name of VM to use normally      */
42
extern _TCHAR*  shippedVMDir;			/* VM bin directory with separator */
40
extern _TCHAR*  shippedVMDir;			/* VM bin directory with separator */
43
extern _TCHAR*  exitData;		  		/* exit data set from Java */
41
extern _TCHAR*  exitData;		  		/* exit data set from Java */
(-)library/win32/eclipseWin.c (-1 lines)
Lines 28-34 Link Here
28
extern HWND topWindow;
28
extern HWND topWindow;
29
29
30
/* Global Variables */
30
/* Global Variables */
31
_TCHAR*  consoleVM     = _T("java.exe");
32
_TCHAR*  defaultVM     = _T("javaw.exe");
31
_TCHAR*  defaultVM     = _T("javaw.exe");
33
_TCHAR*  vmLibrary 	   = _T("jvm.dll");
32
_TCHAR*  vmLibrary 	   = _T("jvm.dll");
34
_TCHAR*  shippedVMDir  = _T("jre\\bin\\");
33
_TCHAR*  shippedVMDir  = _T("jre\\bin\\");
(-)library/win32/make_win32.mak (-18 / +17 lines)
Lines 46-102 Link Here
46
	-DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
46
	-DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
47
	/I$(JAVA_HOME)\include /I$(JAVA_HOME)\include\win32 \
47
	/I$(JAVA_HOME)\include /I$(JAVA_HOME)\include\win32 \
48
	$(cflags)
48
	$(cflags)
49
wcflags = -DUNICODE $(acflags)
49
wcflags = -DUNICODE $(acflags)	
50
cvars = /Zi #/O1	
51
all: $(EXEC) $(DLL)
50
all: $(EXEC) $(DLL)
52
51
53
eclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
52
eclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
54
	$(cc) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj ../eclipseMain.c
53
	$(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseMain.c
55
54
56
eclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
55
eclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
57
	$(cc) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj ../eclipseCommon.c
56
	$(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseCommon.c
58
57
59
eclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
58
eclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
60
    $(cc) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj ../eclipse.c
59
    $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipse.c
61
60
62
eclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
61
eclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
63
    $(cc) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj ../eclipseUtil.c
62
    $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseUtil.c
64
63
65
eclipseConfig.obj: ../eclipseConfig.h ../eclipseUnicode.h ../eclipseConfig.c
64
eclipseConfig.obj: ../eclipseConfig.h ../eclipseUnicode.h ../eclipseConfig.c
66
    $(cc) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj ../eclipseConfig.c
65
    $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseConfig.c
67
66
68
eclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
67
eclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
69
    $(cc) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj eclipseWin.c
68
    $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj eclipseWin.c
70
69
71
eclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
70
eclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
72
    $(cc) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj eclipseWinCommon.c
71
    $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj eclipseWinCommon.c
73
72
74
eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
73
eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
75
	$(CC) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj ../eclipseJNI.c
74
	$(CC) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseJNI.c
76
75
77
aeclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
76
aeclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
78
	$(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseJNI.obj ../eclipseJNI.c
77
	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseJNI.obj ../eclipseJNI.c
79
		
78
		
80
aeclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
79
aeclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
81
	$(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseMain.obj ../eclipseMain.c
80
	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseMain.obj ../eclipseMain.c
82
	
81
	
83
aeclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
82
aeclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
84
	$(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseCommon.obj ../eclipseCommon.c
83
	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseCommon.obj ../eclipseCommon.c
85
84
86
aeclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
85
aeclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
87
    $(cc) $(DEBUG) $(acflags) $(cvars) /Foaeclipse.obj ../eclipse.c
86
    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /Foaeclipse.obj ../eclipse.c
88
87
89
aeclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
88
aeclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
90
    $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseUtil.obj ../eclipseUtil.c
89
    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseUtil.obj ../eclipseUtil.c
91
90
92
aeclipseConfig.obj: ../eclipseConfig.h ../eclipseConfig.h ../eclipseConfig.c
91
aeclipseConfig.obj: ../eclipseConfig.h ../eclipseConfig.h ../eclipseConfig.c
93
    $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseConfig.obj ../eclipseConfig.c
92
    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseConfig.obj ../eclipseConfig.c
94
    
93
    
95
aeclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
94
aeclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
96
    $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseWin.obj eclipseWin.c
95
    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseWin.obj eclipseWin.c
97
96
98
aeclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
97
aeclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
99
    $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseWinCommon.obj eclipseWinCommon.c
98
    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseWinCommon.obj eclipseWinCommon.c
100
99
101
$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
100
$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
102
    $(link) $(LFLAGS) -out:$(PROGRAM_OUTPUT) $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(LIBS)
101
    $(link) $(LFLAGS) -out:$(PROGRAM_OUTPUT) $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(LIBS)
(-)library/carbon/eclipseCarbon.c (-1 lines)
Lines 29-35 Link Here
29
char *findCommand(char *command);
29
char *findCommand(char *command);
30
30
31
/* Global Variables */
31
/* Global Variables */
32
char*  consoleVM     = "java";
33
char*  defaultVM     = "java";
32
char*  defaultVM     = "java";
34
char*  shippedVMDir  = "jre/bin/";
33
char*  shippedVMDir  = "jre/bin/";
35
34
(-)library/photon/eclipsePhoton.c (-2 lines)
Lines 34-44 Link Here
34
char   dirSeparator  = '/';
34
char   dirSeparator  = '/';
35
char   pathSeparator = ':';
35
char   pathSeparator = ':';
36
#ifndef J9VM
36
#ifndef J9VM
37
char*  consoleVM     = "java";
38
char*  defaultVM     = "java";
37
char*  defaultVM     = "java";
39
char*  shippedVMDir  = "jre/bin/";
38
char*  shippedVMDir  = "jre/bin/";
40
#else
39
#else
41
char*  consoleVM     = "j9";
42
char*  defaultVM     = "j9";
40
char*  defaultVM     = "j9";
43
char*  shippedVMDir  = "ive/bin/";
41
char*  shippedVMDir  = "ive/bin/";
44
#endif
42
#endif

Return to bug 167310