I have a task of accessing directory D1 located on remote machine M1 from machineM2.
For this, I created a symbolic link for D1 on M2 using the command:
mklink /d C:\D1 \\M1\e$\D1
Now, from machine M2, if I double click on the symbolic link, I'm very well able to access the actual contents (example:config directory) inside the actual directory D1 BUT when I try to access thisconfig directory using symbolic link in my java program, I get below error:
Unable to find required directory 'C:\D1\config
- All the permissions are well given to D1
- I tried creating a junction pointing to this symbolic link and use it in my program, but in vein. It gave the same error
- We are using Windows Server 2008 R2. We have IIS installed here. Can this be the cause?
- Interesting thing: I tried this symbolic link directly on machine M1 i.e created symbolic link for D1 on M1 and tried accessing it from the copy of my program located on M1. It worked! Probably because symbolic link wasn't pointing to remote directory. IIS is also not installed here.
It will be great if anyone can point out where am I going wrong.
Thank you in advance.
-Adi