I am developing a simple command line app which will search for multiples copies of a file in provided directory and will replace the copies by creating a softlinks and deletes the duplicate file.
i am doing this by recursively traveling every directory provided and matching the files in subdirectories.
the worst part is that when i use GNU compiler (gcj) the code is working properly i.e it is traversing every sub-directory properly, but when i am using sun's 'javac 1.6.0_26' the program is skipping many subdirectories.
now i m using Process , Runtime classes and getRuntime() method to execute "ln -s" linux command to create soft link and passing trgt and sftlnk as argument , this too is not working ( not working on both compiler)
then i used java 1.7.0 through which i was able to create soft-link but again the program is skipping many subdirectories , therefore many files are also skipped.
please have a look on the code :- ( javac 1.6.0_26)
code for javac 1.7.0 :-
please point out my mistakes ... thanks in advance