jar manifest main class can contain /
Bryce McKinlay
bryce@albatross.co.nz
Sun Mar 18 14:11:00 GMT 2001
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 ]
More information about the Java-patches
mailing list