Doesn't the java source code supposed to be same for all jdk1.4.2 ?
Moreoever since AWTEvent is serializable shouldn't this usecase(AWTEvent
RMI'ed accross) work ?
If 'bdata' is private & platform specific, then shouldn't it have been
"transient".
We were creating a event that extended of ActionEvent that extends from
AWTEvent,
which can be worked around. I was just curious if anyone in the list
knew why
the AWTEvent.java is different in the same versions of the JDK.
Thanks,
-Ashok
Mathew, Ashok wrote:
| I am trying to send an object of type AWTEvent from a OSX running
| Apple's Jre 1.4.2 to
| Windows running Sun's Jre 1.4.2 using RMI, but am getting the
following
| error :
|
| java.rmi.ServerException: RemoteException occurred in server
thread;
| nested exception is:
| java.rmi.UnmarshalException: error unmarshalling arguments; nested
| exception is:
| java.io.InvalidClassException: java.awt.AWTEvent; incompatible
types
| for field bdata
|
| On futher investigation I found that the "bdata" in AWTEvent class if
of
| type "long" in OSX version of Jre1.4.2 while is of type "byte[]" in
| Sun's version of Jre 1.4.2. Sun had changed it from "long" to
"byte[]"
| while moving from 1.3 to 1.4.
|
| Any comments ?
I'd be very surprised if something so basic as AWTEvent can be copied
between platforms and still keep any semblance of meaning. They're tied
directly to the event-dispatch machinery, after all, which is very much
platform-dependent. (The field causing the problem *is* private, and
officially undocumented, after all, making it fair game for anything Sun
or
Apple cares to do to it.)
| Any workarounds ?
Extract the data of interest from the event and send it by itself, with
the
receiver constructing a Windows-appropriate AWTEvent from the received
data.
Better yet, explain what problem you're *really* trying to solve (the
one
that sending AWTEvents is intended to be the solution for), and perhaps
someone can propose something less platform-specific.
Glen Fisher
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden