Pidgin Query

Peter Ruibal ruibalp at gmail.com
Wed Aug 1 19:29:42 EDT 2007


On 8/1/07, Jeff Sadowski <jeff.sadowski at gmail.com> wrote:
>
> here is a demonstration of using jna :-)
>
> wget
> https://jna.dev.java.net/source/browse/*checkout*/jna/trunk/jnalib/dist/jna.jar


If you're getting a "WARNING: Certificate verification error for
jna.dev.java.net: unable to get local issuer certificate beef with
jna.dev.java.net" you may have
to:

wget --no-check-certificate
https://jna.dev.java.net/source/browse/*checkout*/jna/trunk/jnalib/dist/jna.jar


cat << END > hello.c
> int hello()
> {
> return 5;
> }
> END
> gcc -shared -o libhello.so hello.c
> PWD=`pwd`
> export CLASSPATH=.:jna.jar
> cat << END > hellow.java
> import com.sun.jna.*;
> import java.util.*;
> class hellow
> {
> String oldclasspath = System.setProperty("java.class.path","$PWD");
> public interface helloworld extends Library {
> int hello();
> }
> public static void main(String[] args)
> {
> String oldjnalibpath = System.setProperty("jna.library.path","$PWD");
> helloworld lib = (helloworld)Native.loadLibrary("hello",helloworld.class);
> System.out.println(lib.hello());
> }
> }
> END
> javac hellow.java
> java hellow
>
>
> On 8/1/07, Sascha Vogt <FunkyFish at gmx.net> wrote:
> > Hi,
> >
> > Peter Ruibal schrieb:
> > > On 8/1/07, *Jeff Sadowski* <jeff.sadowski at gmail.com
> > > <mailto:jeff.sadowski at gmail.com>> wrote:
> > >     Yesterday when I was trying to figure out how to use shared
> > >     object libs in java
> > > For anyone who's interested, you can use jna ( http://jna.dev.java.net
> > > <http://jna.dev.java.net/>) or jni (
> > > http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html) to
> > > directly interface java with c libraries directly.
> > Oh, I did not yet recognize JNA, that looks interesting. I'd like to
> > have Java-bindings for libpurple and thought of SWIG[0] to create the
> > JNI-Code. But I do not have much experience in C.
> > Maybe I'll simply try it out, after I have a little more time (writing
> > master thesis, moving house, ...).
> >
> > I'll post as soon as I have sth presentable.
> >
> > Greetings
> > -Sascha-
> >
> > [0]http://www.swig.org
> >
> > _______________________________________________
> > Devel mailing list
> > Devel at pidgin.im
> > http://pidgin.im/cgi-bin/mailman/listinfo/devel
> >
>
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>


-- 
Peter Ruibal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20070801/1a81561f/attachment.html>


More information about the Devel mailing list