This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

jar manifest main class can contain /


Hi,

A jar Manifest file can contain a main-class field that contains '/' in the
class name instead of '.' to seperate the packages. For example:

  Main-Class: at/dms/kjc/Main

So this patch replaces all '/' with '.' in the jarMainClassName string.

2001-03-18  Mark Wielaard  <mark@klomp.org>

        * gnu/gcj/runtime/FirstThread.java (main): replace / with . in
        jarMainClassName 

OK to commit?

Cheers,

Mark
-- 
Stuff to read:
    <http://www.toad.com/gnu/whatswrong.html>
  What's Wrong with Copy Protection, by John Gilmore
Index: gnu/gcj/runtime/FirstThread.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/gcj/runtime/FirstThread.java,v
retrieving revision 1.6
diff -u -u -r1.6 FirstThread.java
--- FirstThread.java	2000/12/12 00:32:02	1.6
+++ FirstThread.java	2001/03/18 21:01:52
@@ -56,8 +56,10 @@
       jarMainClassName = a.getValue(Attributes.Name.MAIN_CLASS);
 
       if (jarMainClassName != null)
+      {
+	jarMainClassName = jarMainClassName.replace('/','.');
 	return;
-
+      }
     } catch (Exception e) {
       // empty
     }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]