I have a path windows network shared drive like this .
String url="//sample/data/Documents/network/test/";
How can i find the Ip address of the that drive using this path using a java program or cmd prompt?
Via cmd prompt, you can get the IP pinging to 'sample' (following your example in the question) as the console must resolve hostname to IP address.
Via java, perhaps InetAddress.getByName('sample')
could work.
All this assuming the shares are not going over NetBIOS and all the old stuff. That doesn't work over IP as the comment says.