summaryrefslogtreecommitdiff
path: root/tools/gnu/classpath/tools/giop/GRMIC.java
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gnu/classpath/tools/giop/GRMIC.java')
-rw-r--r--tools/gnu/classpath/tools/giop/GRMIC.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/tools/gnu/classpath/tools/giop/GRMIC.java b/tools/gnu/classpath/tools/giop/GRMIC.java
index a372cfd66..c910d7083 100644
--- a/tools/gnu/classpath/tools/giop/GRMIC.java
+++ b/tools/gnu/classpath/tools/giop/GRMIC.java
@@ -104,6 +104,17 @@ public class GRMIC
else
HelpPrinter.printHelpAndExit(HelpPath);
}
+ else if (c.equals("-classpath"))
+ {
+ int f = i + 1;
+ if (f < args.length)
+ {
+ compiler.setClassPath(args[f]);
+ i++;
+ }
+ else
+ HelpPrinter.printHelpAndExit(HelpPath);
+ }
else if (c.charAt(0) != '-')
// No more options - start of class list.
{
@@ -124,17 +135,7 @@ public class GRMIC
if (args[i].charAt(0) != '-')
{
compiler.reset();
- Class c = null;
- try
- {
- c = Thread.currentThread().getContextClassLoader().loadClass(
- args[i]);
- }
- catch (ClassNotFoundException e)
- {
- System.err.println(args[i] + " class not found.");
- System.exit(1);
- }
+ Class c = compiler.loadClass(args[i]);
compiler.compile(c);
String packag = compiler.getPackageName().replace('.', '/');