I want to know the sharing files when systems are connected in LAN......
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
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.
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.
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:
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
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.
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...
Last edited by ram07; March 26th, 2011 at 10:22 PM.