Lines 32-37
Link Here
|
32 |
static void parseArgs(int argc, char *argv[]); |
32 |
static void parseArgs(int argc, char *argv[]); |
33 |
static int readClusterFile(const char* path); |
33 |
static int readClusterFile(const char* path); |
34 |
static int dirExists(const char* path); |
34 |
static int dirExists(const char* path); |
|
|
35 |
static char *readEndorsedDirs(const char *progdir, char **clusterDirs, char *pOptions); |
35 |
|
36 |
|
36 |
static char userdir[MAX_PATH] = "c:\\nbuser"; |
37 |
static char userdir[MAX_PATH] = "c:\\nbuser"; |
37 |
static char options[4098] = ""; |
38 |
static char options[4098] = ""; |
Lines 130-142
Link Here
|
130 |
} |
131 |
} |
131 |
|
132 |
|
132 |
strcat(nbexec, "\\lib\\nbexec.exe"); |
133 |
strcat(nbexec, "\\lib\\nbexec.exe"); |
|
|
134 |
|
135 |
char *pEndorsedDirs = readEndorsedDirs(topdir, defaultDirs, options); |
133 |
|
136 |
|
134 |
sprintf(cmdline2, "\"%s\" %s -J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -J-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense --branding nb --clusters \"%s\" --userdir \"%s\" %s %s", |
137 |
sprintf(cmdline2, "\"%s\" %s -J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -J-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense --branding nb --clusters \"%s\" --userdir \"%s\" %s \"%s\" %s", |
135 |
nbexec, |
138 |
nbexec, |
136 |
jdkswitch, |
139 |
jdkswitch, |
137 |
dirs, |
140 |
dirs, |
138 |
userdir, |
141 |
userdir, |
139 |
options, |
142 |
options, |
|
|
143 |
pEndorsedDirs, |
140 |
cmdline); |
144 |
cmdline); |
141 |
|
145 |
|
142 |
STARTUPINFO start; |
146 |
STARTUPINFO start; |
Lines 498-501
Link Here
|
498 |
} |
502 |
} |
499 |
} |
503 |
} |
500 |
|
504 |
|
501 |
|
505 |
/* Looks for modules/ext/jaxws21/api directory in ideX cluster and if it |
|
|
506 |
* exists returns string that will init java.endorsed.dirs property to this directory |
507 |
* If the directory does not exist or pOptions defines this property empty string |
508 |
* is returned. |
509 |
*/ |
510 |
char *readEndorsedDirs(const char *progdir, char **clusterDirs, char *pOptions) { |
511 |
if (strstr(pOptions, "-J-Djava.endorsed.dirs=")) { |
512 |
return ""; |
513 |
} |
514 |
for (char **clusterName = clusterDirs; *clusterName != NULL; clusterName++) { |
515 |
if (strstr(*clusterName, "ide")) { |
516 |
char *endorsedParam = (char *) malloc(60+strlen(*clusterName)+strlen(progdir)); |
517 |
strcpy(endorsedParam, "-J-Djava.endorsed.dirs=\""); |
518 |
strcat(endorsedParam, progdir); |
519 |
strcat(endorsedParam, "\\"); |
520 |
strcat(endorsedParam, *clusterName); |
521 |
strcat(endorsedParam, "\\modules\\ext\\jaxws21\\api"); |
522 |
#ifdef DEBUG |
523 |
printf("Searching for : >%s<\n", endorsedParam+24); |
524 |
#endif |
525 |
if (dirExists(endorsedParam+24)) { |
526 |
strcat(endorsedParam, "\""); |
527 |
return endorsedParam; |
528 |
} |
529 |
} |
530 |
} |
531 |
return ""; |
532 |
} |
533 |
|