diff options
author | Tom Tromey <tromey@redhat.com> | 2002-08-22 22:44:26 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-08-22 22:44:26 +0000 |
commit | 2263ca09cbad6f97bf7dcdfeff9560a12184eb42 (patch) | |
tree | f4e5e0e961b2fc5694730b48434b8f1b4e2e09ed /libjava | |
parent | 00a8b314c49a053180de6fc6ea3965640e619b0b (diff) | |
download | gcc-2263ca09cbad6f97bf7dcdfeff9560a12184eb42.zip gcc-2263ca09cbad6f97bf7dcdfeff9560a12184eb42.tar.gz gcc-2263ca09cbad6f97bf7dcdfeff9560a12184eb42.tar.bz2 |
gij.cc (help): Document -cp and -classpath.
* gij.cc (help): Document -cp and -classpath.
(main): Handle -classpath.
From-SVN: r56522
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/gij.cc | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2d8e593..e01ab1b 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2002-08-22 Tom Tromey <tromey@redhat.com> + + * gij.cc (help): Document -cp and -classpath. + (main): Handle -classpath. + 2002-08-21 Tom Tromey <tromey@redhat.com> * Makefile.in: Rebuilt. diff --git a/libjava/gij.cc b/libjava/gij.cc index bb56b11..47b2d60 100644 --- a/libjava/gij.cc +++ b/libjava/gij.cc @@ -28,11 +28,14 @@ help () printf (" to interpret Java bytecodes, or\n"); printf (" gij -jar [OPTION] ... JARFILE [ARGS] ...\n"); printf (" to execute a jar file\n\n"); + printf (" --cp LIST set class path\n"); + printf (" --classpath LIST set class path\n"); printf (" -DVAR=VAL define property VAR with value VAL\n"); printf (" --help print this help, then exit\n"); printf (" --ms=NUMBER set initial heap size\n"); printf (" --mx=NUMBER set maximum heap size\n"); printf (" --version print version number, then exit\n"); + printf ("\nOptions can be specified with `-' or `--'.\n"); printf ("\nSee http://gcc.gnu.org/java/ for information on reporting bugs\n"); exit (0); } @@ -115,6 +118,15 @@ main (int argc, const char **argv) goto no_arg; _Jv_SetMaximumHeapSize (argv[++i]); } + else if (! strcmp (arg, "-cp") || ! strcmp (arg, "-classpath")) + { + if (i >= argc - 1) + goto no_arg; + // We set _Jv_Jar_Class_Path. If the user specified `-jar' + // then the jar code will override this. This is the + // correct behavior. + _Jv_Jar_Class_Path = argv[++i]; + } else { fprintf (stderr, "gij: unrecognized option -- `%s'\n", argv[i]); |