--bootclasspath overriding peer classfiles in a jar

Adam Megacz megacz@gcc.gnu.org
Sun Mar 7 03:28:00 GMT 2004


Andrew Haley <aph@redhat.com> writes:
> What on Earth for?  I can't help if I have no idea what you're trying
> to do.

Okay.

- libgcj.jar has the unmodified .class files from libgcj.

- myapp.jar has the .class files from my app

- pruned.jar has all the above .class files (my app and libgcj), but
  "unreachable" methods and fields have been removed.  This means that
  some method calls are "unresolvable" if you confine your view to
  only this jar file.

Before, I was compiling each pruned class file individually, with
-fCLASSPATH=libgcj.jar.  So when the compiler saw a reference to a
pruned method, it would check libgcj.jar, see the method there, and
proceed with the compilation.  The linker would complain about
undefined symbols, but I just use --noinhibit-exec and everything
works fine.

Currently I'd like to achieve the same effect using jar-at-a-time
compilation instead of file-at-a-time.

Any ideas?

  - a



More information about the Java mailing list