Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know that there are differences between Linux and Vista. I know that there are address issues from converting certain files between the two operating systems as well. I am currently working on a program that generates .ppm files in windows. Since the language the generator is written in is Java, and since java is platform independent, will my program run the same way in linux/windows/osx?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

the only difference is the line-ending. if you read the specs of ppm

http://netpbm.sourceforge.net/doc/ppm.html

you will notice, that

"All characters referred to herein are encoded in ASCII. "newline" 
refers the the character known in ASCII as Line Feed or LF. A "white space" 
character is space, CR, LF, TAB, VT, or FF (I.e. what the ANSI standard C
isspace() function calls white space)."

in other words: it does not matter for your program

share|improve this answer
add comment

I would think so. There's not so much difference in how Linux and Windows applications treat files, in fact only text files has different end of line sequence and most of Linux apps knows that and can parse files with wrong endings.

So I think your program will run the same way and produce the same files. But having said that, it all depends on you, Java have ability to use native Windows API and if you would use it than all Java famous portability goes out of window. There's also a lot of other little things you can do not knowingly that will prevent Java running the same way across platforms so you'd better check how it actually runs on the platforms that are important to you.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.