142 |
|
|
143 |
List argsList = new LinkedList(Arrays.asList(args)); |
List argsList = new LinkedList(Arrays.asList(args)); |
144 |
|
|
|
// Check for the -debug option, for appletviewer compatibility. |
|
|
// The -debug option can be given multiple times on the command |
|
|
// line. |
|
|
|
|
|
// FIXME: The debug option will be unsupported until we have the |
|
|
// ability to debug bytecode. For now, just strip it out of the |
|
|
// argument list. |
|
145 |
Iterator argsIter = argsList.iterator(); |
Iterator argsIter = argsList.iterator(); |
|
while (argsIter.hasNext()) |
|
|
{ |
|
|
String currentArg = (String) argsIter.next(); |
|
|
if (currentArg.equals("--")) |
|
|
break; |
|
|
else if (currentArg.equals("-debug")) |
|
|
argsIter.remove(); |
|
|
} |
|
146 |
|
|
147 |
// Check for the -encoding option, for appletviewer compatibility. |
// Check for the -encoding option, for appletviewer compatibility. |
148 |
// The -encoding option can be given multiple times on the command |
// The -encoding option can be given multiple times on the command |
173 |
} |
} |
174 |
} |
} |
175 |
|
|
|
// Check for -J options, for appletviewer compatibility. |
|
|
|
|
|
// FIXME: currently we ignore these options. What are their gcj |
|
|
// equivalents and how do we pass them to the runtime? |
|
|
argsIter = argsList.iterator(); |
|
|
while (argsIter.hasNext()) |
|
|
{ |
|
|
String currentArg = (String) argsIter.next(); |
|
|
|
|
|
if (currentArg.length() == 2) |
|
|
{ |
|
|
if (currentArg.equals("--")) |
|
|
break; |
|
|
else if (currentArg.equals("-J")) |
|
|
{ |
|
|
System.err.println("gcjappletviewer: the -J option should not be followed by a space."); |
|
|
printHelpMessage(1); |
|
|
} |
|
|
} |
|
|
else if (currentArg.length() > 2) |
|
|
{ |
|
|
if (currentArg.substring(0, 2).equals("-J")) |
|
|
argsIter.remove(); |
|
|
} |
|
|
} |
|
|
|
|
176 |
args = (String[]) argsList.toArray(new String[argsList.size()]); |
args = (String[]) argsList.toArray(new String[argsList.size()]); |
177 |
|
|
178 |
LongOpt[] longOptions = |
LongOpt[] longOptions = |