File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

An application on Unix and Windows

 
Suneel Setlur
Ranch Hand
Posts: 202
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What precautions do I take when I develop a Java Application to run on both Unix and Windows(with respect to code)
Suneel
 
Johnson I
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There will not be any change in the coding aspect, But the Platform independence of your code entirly depends on the JRE installed on your OS.
 
Johnson I
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There will not be any change in the coding aspect, But the Platform independence of your code entirly depends on the JRE installed on your OS.
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
You should take care when doing things with the filesystem. For example, be sure to use File.separator in your string representations of file names instead of hard-coding "/" for UNIX or "\" for Windows, both of which would cause your code to fail if ported to the other OS.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic