What Issues prevent Java applications from working on multiple platforms?

后端 未结 8 2164
南笙
南笙 2020-12-14 08:59

Java is supposed to be \"write once, run anywhere\" and it really can be, but in some cases it turns into \"write once, debug everywhere\".

What are the most common

8条回答
  •  盖世英雄少女心
    2020-12-14 09:27

    • Don't make assumptions about the case (in)sensitivity of the file system
    • Don't make assumptions about the path or directory separator
    • Don't make assumptions about the line terminator
    • Don't use the default platform encoding unless you're really, really sure you mean to
    • Don't start "cmd.exe" etc (I know, it sounds obvious - but I've seen it cause problems)

提交回复
热议问题