"一次编译到处调试"很多时候不是因为java本身,而是我们程序员咎由自取。很多地方javadoc都清楚写明了,这个操作是platform-dependent的,比如 java.io.FilerenameTo public boolean renameTo(File dest)Renames the file denoted by this abstract pathname. Many aspects of the behavior of this method are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful. 换言之,如果我们的程序可能会在不同os上使用,我们就应该避免用这个操作(除非没有替换方案)。人家已经警告你了,你还无视,只能怪自己啊。
java.io.FilerenameTo
public boolean renameTo(File dest)Renames the file denoted by this abstract pathname.
Many aspects of the behavior of this method are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful. 换言之,如果我们的程序可能会在不同os上使用,我们就应该避免用这个操作(除非没有替换方案)。人家已经警告你了,你还无视,只能怪自己啊。
Java是一门高深的学问~
里边的东西多着了
学好了再做评价吧
同感java开发工具的落后啊,写程序太麻烦了。这是跨平台的副作用啊
而我要做个真正聪明的程序员