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/gnu | |
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/gnu')
-rw-r--r-- | libjava/gnu/gcj/runtime/FirstThread.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libjava/gnu/gcj/runtime/FirstThread.java b/libjava/gnu/gcj/runtime/FirstThread.java index c7f521c..2102225 100644 --- a/libjava/gnu/gcj/runtime/FirstThread.java +++ b/libjava/gnu/gcj/runtime/FirstThread.java @@ -10,6 +10,8 @@ details. */ package gnu.gcj.runtime; +import java.util.jar.*; + /** * @author Tom Tromey <tromey@cygnus.com> * @date August 24, 1998 @@ -43,6 +45,27 @@ final class FirstThread extends Thread System.exit(1); } + public static void main (String[] args) + { + try { + + JarFile j = new JarFile (args[0]); + + Attributes a = j.getManifest().getMainAttributes(); + + jarMainClassName = a.getValue(Attributes.Name.MAIN_CLASS); + + } catch (Exception e) { + + System.err.println ("Failed to load Main-Class manifest attribute from\n" + args[0]); + + } + } + + // If interpreter is invoked with -jar, the main class name is recorded + // here. + public static String jarMainClassName; + // Private data. private Class klass; private String klass_name; |