How come when I write a Java program on my Mac, and then try to open it on my Windows PC, all of the white space is gone and it displays it all in one line? And how can I avoid this?

marked as duplicate by Mokubai May 8 at 5:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • That sounds like an encoding issue. What text editor are you using? – Ramhound May 7 at 22:55
  • On my Mac I use Eclipse, but then my professor will try to open it in jGrasp and cannot run it, perhaps the way the text is encoded is different on the different IDEs? – Lou_is May 7 at 23:03
  • Try looking at the file with something like  od -cb. – Scott May 8 at 3:17

Browse other questions tagged or ask your own question.