开发者

things that prevent cross-platformness your java web application

开发者 https://www.devze.com 2022-12-15 05:26 出处:网络
开发者_开发技巧are there any things that once can do ignorantly that can prevent a java web application from being cross platform? (windows/linux/mac)
开发者_开发技巧

are there any things that once can do ignorantly that can prevent a java web application from being cross platform? (windows/linux/mac)

Tools I am planning to use are java/spring framework/hibernate


  • Hard-coding file separators/paths.
  • Using native libraries.
  • Using Runtime.exec()
  • Using sun.* classes (this may cause portability issues with non-Sun JVMs).


not honoring case-sensitivity in filesystem


Using system default character encoding for input/output when inappropriate


In addition to what Dan Dyer said:

  • calling executables by a fixed path or of a fixed name
  • assuming a certain shell command syntax will work properly (eg 2>&1 or something)
  • deleting or renaming a file that some other process (or the same one!) might have open
  • Making assumptions about the working directory (eg using relative paths to load resouces from the file system)
0

精彩评论

暂无评论...
验证码 换一张
取 消