how to read jar file
Bryce McKinlay
bryce@albatross.co.nz
Mon Dec 11 17:39:00 GMT 2000
Ian Zhang wrote:
> >From the document on the Red Hat web site, the gcj
> program can read a jar file. But I tried the gcj
> which come from Red Hat 7 and did not make it work.
> It seems to me that gcj can only read .java or .class
> files. Can anyone help me with this and tell me exact
> command format?
I think it only works for uncompressed jar files. If you try to
compile a compressed jar, you'll get a "Not a valid .class file" error
or just an empty object file and no error. For an uncompressed jar,
you should be able to run something like:
gcj --shared myjar.jar -o myjar.so
or
gcj myjar.jar --main=my.Main -o myapp
regards
[ bryce ]
More information about the Java
mailing list