[OmniOS-discuss] java : feca beba : endian problem?

Mayuresh Kathe mayuresh at kathe.in
Thu Oct 31 22:13:25 UTC 2013


i checked on openbsd running on x86-64, the header is still
the same, "fecabeba".
as per the material i've read on java, it should always be,
"cafebabe".
am i doing something wrong somewhere?


On Thu, Oct 31, 2013 at 02:10:23PM -0400, Theo Schlossnagle wrote:
> Class files are cross endian portable.  the header is 0xbabecafe big
> endian... od -x will print native endian... looks right to me.
> 
> 
> On Thu, Oct 31, 2013 at 1:54 PM, Mayuresh Kathe <mayuresh at kathe.in> wrote:
> 
> > hello, i've been writing short java programs under
> > omnios, and they work well, no issues with that.
> >
> > just did a "od -x <filename>.class" on one of my
> > programs and found the following;
> >
> > 0000000 feca beba 0000 3200 2e00 000a 000b 0915
> > 0000020 1600 1700 0008 0a18 1900 1a00 000a 0016
> > 0000040 0a1b 1c00 1d00 0008 081e 1f00 000a 0019
> > 0000060 0720 2100 0007 0122 0600 693c 696e 3e74
> > .
> > .
> > .
> >
> > is that reference to "feca beba" due to endian
> > issues?
> > it should actually be "cafe babe". :)
> >
> > ~mayuresh
> >
> > _______________________________________________
> > OmniOS-discuss mailing list
> > OmniOS-discuss at lists.omniti.com
> > http://lists.omniti.com/mailman/listinfo/omnios-discuss
> >
> 
> 
> 
> -- 
> 
> Theo Schlossnagle
> 
> http://omniti.com/is/theo-schlossnagle


More information about the OmniOS-discuss mailing list