[Rxtx] Easier to install
Gregg Wonderly
gergg at cox.net
Mon Jul 11 07:10:50 MDT 2011
The easiest thing to do, anytime you have a JNI library to use, is just include all the versions in the jar, and copy them out to a temp file as created by File, and the use load instead of loadLibrary to load from that path.
Makes the users job easy. You do need to think about Exception handling in case it was already loaded hand act accordingly.
Gregg Wonderly
Sent from my iPhone
On Jul 7, 2011, at 1:05 PM, Kustaa Nyholm <Kustaa.Nyholm at planmeca.com> wrote:
> On 7/7/11 19:33, "Stephen More" <stephen.more at gmail.com> wrote:
>
>> I had a thought...
>> What if all the Platform Specific libraries were included in the
>> distributed jar file, then there could be a java class something like
>> installUtils with installIfNeeded().
>>
>> Then if the end-users ever upgrade their jre, applications could be
>> smart enough to realize the libs no longer exist and install them in
>> the proper location.
>>
>> Has someone already written such code, or should I get started ?
>
>
>
> My PureJavaComm which is based on JNA uses a similar stratege (JNA does
> it all) so there is never a platform library that you need to build,
> install or worry about:
>
> http://www.sparetimelabs.com/purejavacomm/index.html
>
> and
>
> https://github.com/nyholku/purejavacomm
>
> br Kusti
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
More information about the Rxtx
mailing list