327 |
Debug.log(3, "done"); |
Debug.log(3, "done"); |
328 |
} |
} |
329 |
|
|
330 |
if (optlen <= 0) |
if (optlen <= 0) { |
331 |
{ |
|
332 |
if (!option.startsWith("-J")) { |
if (option.startsWith("-JD")) { |
333 |
|
// Simulate VM option -D |
334 |
|
String propertyValue = option.substring(3); |
335 |
|
int ndx = propertyValue.indexOf('='); |
336 |
|
if (ndx <= 0) { |
337 |
|
reporter.printError("Illegal format in option " + option + ": use -JDproperty=value"); |
338 |
|
shutdown(); |
339 |
|
} |
340 |
|
else { |
341 |
|
String property = propertyValue.substring(0, ndx); |
342 |
|
String value = propertyValue.substring(ndx + 1); |
343 |
|
System.setProperty(property, value); |
344 |
|
} |
345 |
|
} |
346 |
|
else if (option.startsWith("-J")) { |
347 |
|
//--- Warn if VM option is encountered |
348 |
|
reporter.printWarning("Ignored option " + option + ". Pass this option to the VM if required."); |
349 |
|
} |
350 |
|
else { |
351 |
//--- Complain if not found |
//--- Complain if not found |
352 |
|
|
353 |
reporter.printError("Unknown option " + option); |
reporter.printError("Unknown option " + option); |
445 |
|
|
446 |
String classOrPackage = (String) it.next(); |
String classOrPackage = (String) it.next(); |
447 |
|
|
448 |
|
if (classOrPackage.endsWith(".java")) { |
449 |
|
File sourceFile = new File(classOrPackage); |
450 |
|
if (!sourceFile.exists()) { |
451 |
|
} |
452 |
|
else if (sourceFile.isDirectory()) { |
453 |
|
|
454 |
|
} |
455 |
|
else { |
456 |
|
rootDoc.addSpecifiedSourceFile(sourceFile); |
457 |
|
} |
458 |
|
} |
459 |
|
else { |
460 |
//--- Check for illegal name |
//--- Check for illegal name |
461 |
|
|
462 |
if (classOrPackage.startsWith(".") |
if (classOrPackage.startsWith(".") |
542 |
rootDoc.addSpecifiedClassName(classOrPackage); |
rootDoc.addSpecifiedClassName(classOrPackage); |
543 |
} |
} |
544 |
} |
} |
545 |
|
} |
546 |
} |
} |
547 |
|
|
548 |
//--- Complain if no packages or classes specified |
//--- Complain if no packages or classes specified |