Recently come across some a Java program that have problem to work on Linux due the the program used "\" for directory.
It remind me of a dirty trick I used last time. Just used "/" in the code, it will work in both Windows and Linux.
Java as a cross platform language, already provide simple way to solve this with a static variable File.seperator . A much better alternative to my dirty trick.
It remind me of a dirty trick I used last time. Just used "/" in the code, it will work in both Windows and Linux.
Java as a cross platform language, already provide simple way to solve this with a static variable File.seperator . A much better alternative to my dirty trick.
1 comment:
I personally prefer "dirty" way, the correct way ( preferred way ) is too much longer.
Post a Comment