generating shared libs

Tom Tromey
Fri Dec 22 23:07:00 GMT 2000

>>>>> ">" == Immanuel, Gidado-Yisa <> writes:

>>   1. How do I combine several object files (created from .javaJ) to
>>   make my own shared lib (.so)?

The same way you make any .so on your platform.

For instance on Linux I believe you can compile each object file with
`-fPIC' and then link them into a shared object using `gcc -shared'.

>>   2. Also, is there a convenient way to do [1] but starting from a
>>   jar file?

I think you can compile jar files directly.  However, I've never done
it (and to me it seems a bit amazing :-).  Maybe something like this
would work?

    gcc -fPIC -shared -o mystuff.jar


More information about the Java mailing list