I want to know the sharing files when systems are connected in LAN......
Printable View
I want to know the sharing files when systems are connected in LAN......
Hello ram07,
Welcome to the Java Programming Forums.
Can you please give us some more information regarding this?
Are you looking to create a server/client so you can exchange the files?
If the machines are on a LAN then you can transfer files direct.
Actually I want to find the sharing files in LAN by using java program. Not for transfer the data.. please help How to find the sharing files in LAN by using java program..
I'm not too sure how you would go about doing this but you could try something like:
Code Java:import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; public class LANshares { /** * JavaProgrammingForums.com */ public static void main(String[] args) { try { String line = null; String[] commands = new String[] { "cmd", "/C", "net share" }; Process child = Runtime.getRuntime().exec(commands); InputStream ins = child.getInputStream(); BufferedReader buffReader = new BufferedReader(new InputStreamReader(ins)); while (!(line = buffReader.readLine()).trim().equals( "The command completed successfully.")) { System.out.println(line); } } catch (Exception exp) { System.out.println("Ouch - " + exp); } } }
NET SHARE command
javaPF actually it display with in the system sharing files only. But I want Remote system sharing folders.. please give me reply friends....
Actually I wrote one program it displayed Remote system shared files in the shared folder. But I want to diaplay the that shared folder name. please give me reply friends...