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]

Re: jar manifest main class can contain /


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 ]



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