This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: jar manifest main class can contain /
- To: Mark Wielaard <mark at klomp dot org>
- Subject: Re: jar manifest main class can contain /
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Mon, 19 Mar 2001 10:21:59 +1200
- CC: java-patches at gcc dot gnu dot org
- References: <20010318221648.A547@klomp.org>
Mark Wielaard wrote:
> 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?
Since the Jar URLClassLoader should be handling this format already, maybe a
better fix would be for FirstThread or whatever to be explicitly creating its
own Jar URLClassLoader and passing that to Class.forName() in the "gij -jar"
case? I think to implement the correct 1.2 semantics we need to have a
seperate ClassLoader instance loading interpreted classes anyway - right now I
think that everything gets loaded by the one, system classloader which doesn't
seem right.
But as a quick workaround, this is fine to commit.
regards
[ bryce ]