On Sun, 15 Apr 2001, Dick Repasky wrote:
>
> Why doesn't a call to getSystemClipboard give me what's in the
> system clipboard?
[snip]
> So, if Java's system clipboard isn't really the system clip
> board, what is it?
I'm not clear on the exact details since I'm not an X11 developer.
X11 supports both 'selection' and 'cut' concepts simultaneously. Thus there
are several ways of accessing the system clipboard. (Which, actually,
isn't a system clipboard, it's an X server clipboard.)
I'm guessing that since the Linux JVM is a port of the Windows JVM,
they picked the X11 method that most closely resembled Windows behavior,
probably to prevent the cacophony of whines that seem to arise whenver
something in Java isn't exactly like Windows. :p
Naturally, this is not the method acutally used by most native X11
applications.
Xclipboard serves as a reasonable translation medium between X11 native apps
and whatever method the JVM is using. Launch XClipboard, then
select your X11 text. Paste it into an XClipboard view. Now select
it again and you can now paste it into a Java app. The reverse direction
also works.
Note, though, that 1.2.2 has a good chance of dumping core after doing
this more than once, and 1.3 has a smaller but still finite chance of
dumping core. It's flakey enough that I avoid pasting between Java
and native X11 at all.
This is one of my pet peeves, too.
--
Joi Ellis Software Engineer
Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED]
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]