1326 if (JLI_StrCCmp(arg, "-Djava.class.path=") == 0) {
1327 _have_classpath = JNI_TRUE;
1328 } else if (JLI_StrCmp(arg, "-Djava.awt.headless=true") == 0) {
1329 /*
1330 * Checking for headless toolkit option in the same way as AWT does:
1331 * "true" means true and any other value means false
1332 */
1333 headless = true;
1334 } else if (JLI_StrCCmp(arg, "-Djava.awt.headless=") == 0) {
1335 headless = false;
1336 }
1337 AddOption(arg, NULL);
1338 }
1339
1340 /*
1341 * Check for CDS option
1342 */
1343 if (JLI_StrCmp(arg, "-Xshare:dump") == 0) {
1344 dumpSharedSpaces = JNI_TRUE;
1345 }
1346 }
1347
1348 if (*pwhat == NULL && --argc >= 0) {
1349 *pwhat = *argv++;
1350 }
1351
1352 if (*pwhat == NULL) {
1353 /* LM_UNKNOWN okay for options that exit */
1354 if (!listModules && !describeModule && !validateModules && !dumpSharedSpaces) {
1355 *pret = 1;
1356 }
1357 } else if (mode == LM_UNKNOWN) {
1358 /* default to LM_CLASS if -m, -jar and -cp options are
1359 * not specified */
1360 if (!_have_classpath) {
1361 SetClassPath(".");
1362 }
1363 mode = IsSourceFile(arg) ? LM_SOURCE : LM_CLASS;
1364 } else if (mode == LM_CLASS && IsSourceFile(arg)) {
1365 /* override LM_CLASS mode if given a source file */
|
1326 if (JLI_StrCCmp(arg, "-Djava.class.path=") == 0) {
1327 _have_classpath = JNI_TRUE;
1328 } else if (JLI_StrCmp(arg, "-Djava.awt.headless=true") == 0) {
1329 /*
1330 * Checking for headless toolkit option in the same way as AWT does:
1331 * "true" means true and any other value means false
1332 */
1333 headless = true;
1334 } else if (JLI_StrCCmp(arg, "-Djava.awt.headless=") == 0) {
1335 headless = false;
1336 }
1337 AddOption(arg, NULL);
1338 }
1339
1340 /*
1341 * Check for CDS option
1342 */
1343 if (JLI_StrCmp(arg, "-Xshare:dump") == 0) {
1344 dumpSharedSpaces = JNI_TRUE;
1345 }
1346 if (JLI_StrCmp(arg, "-XX:AOTMode=create") == 0) {
1347 // Alias for -Xshare:dump
1348 dumpSharedSpaces = JNI_TRUE;
1349 }
1350 }
1351
1352 if (*pwhat == NULL && --argc >= 0) {
1353 *pwhat = *argv++;
1354 }
1355
1356 if (*pwhat == NULL) {
1357 /* LM_UNKNOWN okay for options that exit */
1358 if (!listModules && !describeModule && !validateModules && !dumpSharedSpaces) {
1359 *pret = 1;
1360 }
1361 } else if (mode == LM_UNKNOWN) {
1362 /* default to LM_CLASS if -m, -jar and -cp options are
1363 * not specified */
1364 if (!_have_classpath) {
1365 SetClassPath(".");
1366 }
1367 mode = IsSourceFile(arg) ? LM_SOURCE : LM_CLASS;
1368 } else if (mode == LM_CLASS && IsSourceFile(arg)) {
1369 /* override LM_CLASS mode if given a source file */
|