This is the mail archive of the java-discuss@sources.redhat.com 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: generating shared libs


>>>>> ">" == Immanuel, Gidado-Yisa <avm3@cdc.gov> 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 libmystuff.so mystuff.jar

Tom

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