哪些问题阻止Java应用程序在多个平台上运行? [英] What Issues prevent Java applications from working on multiple platforms?

查看:171
本文介绍了哪些问题阻止Java应用程序在多个平台上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java应该是一次编写,随处运行,它确实可以,但在某些情况下,它会变成一次编写,随处调试。

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".

将Java应用程序从一个平台移动到另一个平台时出现问题的最常见原因是什么?

What are the most common reasons for problems when moving a Java application from one platform to another?

什么是不常见但有趣的原因?

What are un-common but interesting reasons?

推荐答案


  • 不要假设文件系统的情况(in)灵敏度

  • 不要对路径或目录分隔符做出假设

  • 不要对行终止符做出假设

  • 不要使用默认平台编码,除非你真的,非常确定你的意思

  • 不要启动cmd.exe等(我知道,这听起来很明显 - 但我看到它的原因问题)

    • 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)
    • 这篇关于哪些问题阻止Java应用程序在多个平台上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆