It never would have been a problem in Java or another language that didn't deal with memory directly (using references).
Actually it would have.
As Scott points out, Java "references" are really pointers, probably "smart pointers", with the inard hidden to protect the illiterati. A "Reference" in Java would have had the same problem that pointers in C++ had. The problem was the memory model; your Intel box used 16-bit code, and a small pointer model, allowing for 16-bit pointers. Your 'nix box used a 32-bit pointer model, which was incompatible with the 16-bit poitners stored in your file. (I am assuming that you did not try to read pointers generated on the Intel system with your 'nix system, or vice versa....) If your 'nix box were to have been an Intel device, and your 'nix supported small pointer models, your code would probably have worked just fine.