Why can't you use the actual server name directly? The jCIFS API can do that cross-platform (only a Windows JRE knows how to do that using the java.io classes).
Joined: Oct 04, 2004
Thank Ulf, for the suggesting one of the way.
I got a simple solution. I don't know it will be considered as good practice or not.
My solution is:
My target platform is window only & it will be windows.
I did one thing I issued a command "net use" on command prompt through the code. Captured its output & parsed the required String there.
My applet will be called 5-10 times only in a day. So this should not hit the performance.