Mac Dawson

+ Follow
since Oct 15, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mac Dawson

Hi all,
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
9 years ago