diff options
author | Anthony Green <green@gcc.gnu.org> | 2000-08-21 06:05:20 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2000-08-21 06:05:20 +0000 |
commit | 1a558147d192b81f718a55056d2467221dfeb5de (patch) | |
tree | f43cbb5fc8ea1cd44134f23db03b2228cc3604df /libjava/gij.cc | |
parent | b485e15bf861b6eb5680c3a268036b2cdeacd656 (diff) | |
download | gcc-1a558147d192b81f718a55056d2467221dfeb5de.zip gcc-1a558147d192b81f718a55056d2467221dfeb5de.tar.gz gcc-1a558147d192b81f718a55056d2467221dfeb5de.tar.bz2 |
natSystem.cc (init_properties): Change sourceware reference to sources.redhat.com.
Sun Aug 20 21:02:48 2000 Anthony Green <green@redhat.com>
* java/lang/natSystem.cc (init_properties): Change sourceware
reference to sources.redhat.com.
* include/java-props.h: Add _Jv_Jar_Class_Path.
* prims.cc: Ditto. Set it from `gij -jar file' option.
* java/lang/natSystem.cc (init_properties): Set java.class.path
from
{gij -jar file}:{CLASSPATH variable}:{-Djava.class.path= or .}
* java/util/PropertyPermission.java: Import from GNU Classpath.
* Makefile.in: Rebuilt.
* Makefile.am: Add java/util/PropertyPermission.java.
* java/lang/System.java: Add setProperty method.
* gij.cc (main): Add -jar option to execute jar files.
(help): Describe -jar option.
* prims.cc (_Jv_RunMain): Add support for jar execution mode.
* gnu/gcj/tools/Gij.java: New file.
* include/jvm.h: Add is_jar argument to _Jv_RunMain.
* gnu/gcj/runtime/FirstThread.java (main): New method.
* java/util/jar/Attributes.java: Correct comment spelling.
From-SVN: r35829
Diffstat (limited to 'libjava/gij.cc')
-rw-r--r-- | libjava/gij.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libjava/gij.cc b/libjava/gij.cc index 54674a9..7d53beb 100644 --- a/libjava/gij.cc +++ b/libjava/gij.cc @@ -24,8 +24,10 @@ details. */ static void help () { - printf ("Usage: gij [OPTION] ... CLASS [ARGS] ...\n\n"); - printf ("Interpret Java bytecodes\n\n"); + printf ("Usage: gij [OPTION] ... CLASS [ARGS] ...\n"); + printf (" to interpret Java bytecodes, or\n"); + printf (" gij -jar [OPTION] ... JARFILE [ARGS] ...\n"); + printf (" to execute a jar file\n\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"); @@ -51,6 +53,7 @@ main (int argc, const char **argv) /* We rearrange ARGV so that all the -D options appear near the beginning. */ int last_D_option = 0; + bool jar_mode = false; int i; for (i = 1; i < argc; ++i) @@ -73,6 +76,12 @@ main (int argc, const char **argv) continue; } + if (! strcmp (arg, "-jar")) + { + jar_mode = true; + continue; + } + /* Allow both single or double hyphen for all remaining options. */ if (arg[1] == '-') @@ -120,9 +129,12 @@ main (int argc, const char **argv) if (argc - i < 1) { fprintf (stderr, "Usage: gij [OPTION] ... CLASS [ARGS] ...\n"); + fprintf (stderr, " to interpret Java bytecodes, or\n"); + fprintf (stderr, " gij -jar [OPTION] ... JARFILE [ARGS] ...\n"); + fprintf (stderr, " to execute a jar file\n"); fprintf (stderr, "Try `gij --help' for more information.\n"); exit (1); } - _Jv_RunMain (argv[i], argc - i, argv + i); + _Jv_RunMain (argv[i], argc - i, argv + i, jar_mode); } |