@@ -0,0 +1,1132 @@
+/* desktopwindow Java driver example program - by StephaneAG - 2013 */%0A%0A// imports%0Aimport com.sun.jna.Library;%0Aimport com.sun.jna.Native;%0A%0A%0Apublic class DesktopWindowDriver %7B%0A%09%09%0A%0A%09/* java interface wich 'bridges' with the C shared library */%0A%09public interface DesktopWindow extends Library %7B%0A%09%09public void foo(); // name of the C fcn defined in the 'desktopwindow.h' & implemented in 'desktopwindow.c'%0A%09%7D%0A%0A%09/* java program 'main' */%0A%09static public void main(String argv%5B%5D)%7B%0A%09%09DesktopWindow desktopwindow = (DesktopWindow) Native.loadLibrary(%22desktopwindow%22, DesktopWindow.class);%0A%09%09desktopwindow.foo(); // run the C fcn 'foo()' ( wich should print %22Hello World ! %22 to stdout)%0A%09%7D%0A%7D%0A%0A%0A//public interface libdesktopwindow extends Library %7B%0A//%09desktopwindow INSTANCE = (libdesktopwindow) Native.loadLibrary(%22desktopwindow%22, desktopwindow.class);%0A//void foo();%0A//%7D%0A%0A///* not sure the following goes in that file (...) */%0A//static %7B%0A//%09System.setProperty(%22jna.library.path%22, %22/usr/lib/libdesktopwindow.so%22);%0A//%7D%0A%0A/* if tha tdirty little test works from here, I must admit I'd be happily surprised ;) */%0A//libdesktopwindow.INSTANCE.foo();%0A

Create DesktopWindowDriver.java