On Feb 10, 2008 4:55 AM, Mayuresh Kathe <[EMAIL PROTECTED]> wrote: > I've go an AMD32 bit machine (dmesg at the bottom of the mail). ... > Compiled it using "javac" and ran it using "java". > It runs OK, but when I viewed it using "od -x helloWorld.class | less" > the first 8 bytes have been inverted, reminds me of the NUXI problem, > see below: > 0000000 feca beba 0000 3100 1d00 000a 0006 090f
To quote SUSv3's specification for od's -x option: The byte order used when interpreting numeric values is implementation-defined, but shall correspond to the order in which a constant of the corresponding type is stored in memory on the system. So, on AMD64, it's little-endian and the output you report is correct. If you want the hex values to be reported individually in the byte order of the file, use "od -t xC". > Any ideas about why this is happening and how I could fix it? Step 1: learn to question your assumptions... Philip Guenther