1338 if (JLI_StrCCmp(arg, "-Djava.class.path=") == 0) {
1339 _have_classpath = JNI_TRUE;
1340 } else if (JLI_StrCmp(arg, "-Djava.awt.headless=true") == 0) {
1341 /*
1342 * Checking for headless toolkit option in the same way as AWT does:
1343 * "true" means true and any other value means false
1344 */
1345 headless = true;
1346 } else if (JLI_StrCCmp(arg, "-Djava.awt.headless=") == 0) {
1347 headless = false;
1348 }
1349 AddOption(arg, NULL);
1350 }
1351
1352 /*
1353 * Check for CDS option
1354 */
1355 if (JLI_StrCmp(arg, "-Xshare:dump") == 0) {
1356 dumpSharedSpaces = JNI_TRUE;
1357 }
1358 }
1359
1360 if (*pwhat == NULL && --argc >= 0) {
1361 *pwhat = *argv++;
1362 }
1363
1364 if (*pwhat == NULL) {
1365 /* LM_UNKNOWN okay for options that exit */
1366 if (!listModules && !describeModule && !validateModules && !dumpSharedSpaces) {
1367 *pret = 1;
1368 printUsageKind = HELP_CONCISE;
1369 }
1370 } else if (mode == LM_UNKNOWN) {
1371 if (!_have_classpath) {
1372 SetClassPath(".");
1373 }
1374 /* If neither of -m, -jar, --source option is set, then the
1375 * launcher mode is LM_UNKNOWN. In such cases, we determine the
1376 * mode as LM_CLASS or LM_SOURCE per the input file. */
1377 mode = IsSourceFile(arg) ? LM_SOURCE : LM_CLASS;
|
1338 if (JLI_StrCCmp(arg, "-Djava.class.path=") == 0) {
1339 _have_classpath = JNI_TRUE;
1340 } else if (JLI_StrCmp(arg, "-Djava.awt.headless=true") == 0) {
1341 /*
1342 * Checking for headless toolkit option in the same way as AWT does:
1343 * "true" means true and any other value means false
1344 */
1345 headless = true;
1346 } else if (JLI_StrCCmp(arg, "-Djava.awt.headless=") == 0) {
1347 headless = false;
1348 }
1349 AddOption(arg, NULL);
1350 }
1351
1352 /*
1353 * Check for CDS option
1354 */
1355 if (JLI_StrCmp(arg, "-Xshare:dump") == 0) {
1356 dumpSharedSpaces = JNI_TRUE;
1357 }
1358 if (JLI_StrCmp(arg, "-XX:AOTMode=create") == 0) {
1359 // Alias for -Xshare:dump
1360 dumpSharedSpaces = JNI_TRUE;
1361 }
1362 }
1363
1364 if (*pwhat == NULL && --argc >= 0) {
1365 *pwhat = *argv++;
1366 }
1367
1368 if (*pwhat == NULL) {
1369 /* LM_UNKNOWN okay for options that exit */
1370 if (!listModules && !describeModule && !validateModules && !dumpSharedSpaces) {
1371 *pret = 1;
1372 printUsageKind = HELP_CONCISE;
1373 }
1374 } else if (mode == LM_UNKNOWN) {
1375 if (!_have_classpath) {
1376 SetClassPath(".");
1377 }
1378 /* If neither of -m, -jar, --source option is set, then the
1379 * launcher mode is LM_UNKNOWN. In such cases, we determine the
1380 * mode as LM_CLASS or LM_SOURCE per the input file. */
1381 mode = IsSourceFile(arg) ? LM_SOURCE : LM_CLASS;
|