>Date: Sat, 31 Jul 1999 15:12:11 -0700
>From: Nathan Meyers <[EMAIL PROTECTED]>
>This discussion inspired me into a burst of frenzied activity, and I've
>written a simple JNI-based solution. Check out XClipboard at
>http://www.teleport.com/~nmeyers/FreeWare/
It works!!!!!!
Nathan, this is absolutely amazing!!! Exactly what I had in mind.
Wow! what an excellent newsgroup!!!
I was able to call the method readPrimarySelectionString() without a
problem. The additional code to my program is only 3 lines: the
"import util.nmeyers.XClipboard;" statement, then these 2 lines within
one of my methods:
XClipboard xc = new XClipboard();
String clip = xc.readPrimarySelectionString();
I decided to put your libXClipboard.so in /usr/local/lib, and then
globally include this path in LD_LIBRARY_PATH by specifying it in
/etc/profile.
The Makefile worked well on my Slackware 3.6, jdk117_v1a system.
As you said, there's a 2nd half to this problem: passing data from
XClipboard.java to XClipboard.c and then putting it into the PRIMARY
clipboard.
It's funny that there's no way to do this without JNI. If you use
a TextArea class, it will accept paste-ing with the mouse, so somewhere
within the bowels of the JVM, it must be reading the primary clipboard.
>XClipboard handles the problem of getting the pasted bits from X.
>Calling it from a mouse action is left as an exercise to the reader :-).
>
>Nathan
great program, Nathan. This should be posted on the blackdown website
under "3rd Party Projects and Packages".
-Larry Gates
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]