M
matt melton
Hello,
I am having a spot of bother transmitting the bytes of a class file
over a TCP Socket from a JVM on Linux to a JVM on NT 4.
If I have compiled the class file on NT I can send it's bytes it to
the Linux machine and use it, without a problem.
If I compile the class file on NT and use a JVM on Linux to send the
class bytes to another JVM on Linux I get "bad magic number". I have
read that this is due to the CAFEBABE bytes at the beginning of the
calss file so I did an octal dump on both class files ( od -x ) on
the nfs filesystem. The mtab file says the file system type is autofs
if that makes any difference.
If I compile the class file on the linux system it can be transmitted
to an NT machine and used, but it still cannot be transmitted to
another Linux machine without the same error occuring.
Here are the truncated octal dumps they appear the same to me,but diff
says that they differ but it does not say where.
Compiled on Linux.
0000000 feca beba 0000 2e00 9200 000a 0034 063c
0000020 0040 0000 0000 0000 000a 003d 093e 3d00
0000040 3f00 000a 0040 0a41 4000 4200 0009 0043
0000060 0744 4500 000a 0009 083c 4600 000a 0009
0000100 0a47 0900 4800 0008 0a49 0900 4a00 000a
0000120 004b 064c f13f 9999 9999 9a99 000a 004d
0000140 064e 6f40 00e0 0000 0000 000a 004b 064f
....
Compiled on NT.
0000000 feca beba 0000 2e00 9200 000a 0034 063c
0000020 0040 0000 0000 0000 000a 003d 093e 3d00
0000040 3f00 000a 0040 0a41 4000 4200 0009 0043
0000060 0744 4500 000a 0009 083c 4600 000a 0009
0000100 0a47 0900 4800 0008 0a49 0900 4a00 000a
0000120 004b 064c f13f 9999 9999 9a99 000a 004d
0000140 064e 6f40 00e0 0000 0000 000a 004b 064f
....
do I need to reorder the bytes if I am reading from a Linux or NFS
filesystem before I transmit them.
I assumed that the two systems would work the same though I have
limited knowledge of the filesystems and how java would read in form
each. I notice that the cafe babe is in a different byte ordering. I
transfer my files so taht I can access them from Linux using a Mapped
drive on NT to the Samba Server NFS.
Any help would be greatly appreciated. In the mean time I will
attempt to reorder the bytes and send the class files, and post if
this works.
Thanks for any help.
MAtthew Melton
I am having a spot of bother transmitting the bytes of a class file
over a TCP Socket from a JVM on Linux to a JVM on NT 4.
If I have compiled the class file on NT I can send it's bytes it to
the Linux machine and use it, without a problem.
If I compile the class file on NT and use a JVM on Linux to send the
class bytes to another JVM on Linux I get "bad magic number". I have
read that this is due to the CAFEBABE bytes at the beginning of the
calss file so I did an octal dump on both class files ( od -x ) on
the nfs filesystem. The mtab file says the file system type is autofs
if that makes any difference.
If I compile the class file on the linux system it can be transmitted
to an NT machine and used, but it still cannot be transmitted to
another Linux machine without the same error occuring.
Here are the truncated octal dumps they appear the same to me,but diff
says that they differ but it does not say where.
Compiled on Linux.
0000000 feca beba 0000 2e00 9200 000a 0034 063c
0000020 0040 0000 0000 0000 000a 003d 093e 3d00
0000040 3f00 000a 0040 0a41 4000 4200 0009 0043
0000060 0744 4500 000a 0009 083c 4600 000a 0009
0000100 0a47 0900 4800 0008 0a49 0900 4a00 000a
0000120 004b 064c f13f 9999 9999 9a99 000a 004d
0000140 064e 6f40 00e0 0000 0000 000a 004b 064f
....
Compiled on NT.
0000000 feca beba 0000 2e00 9200 000a 0034 063c
0000020 0040 0000 0000 0000 000a 003d 093e 3d00
0000040 3f00 000a 0040 0a41 4000 4200 0009 0043
0000060 0744 4500 000a 0009 083c 4600 000a 0009
0000100 0a47 0900 4800 0008 0a49 0900 4a00 000a
0000120 004b 064c f13f 9999 9999 9a99 000a 004d
0000140 064e 6f40 00e0 0000 0000 000a 004b 064f
....
do I need to reorder the bytes if I am reading from a Linux or NFS
filesystem before I transmit them.
I assumed that the two systems would work the same though I have
limited knowledge of the filesystems and how java would read in form
each. I notice that the cafe babe is in a different byte ordering. I
transfer my files so taht I can access them from Linux using a Mapped
drive on NT to the Samba Server NFS.
Any help would be greatly appreciated. In the mean time I will
attempt to reorder the bytes and send the class files, and post if
this works.
Thanks for any help.
MAtthew Melton