Hi there, I am facing one problem while findingout all host machines in the LAN. I want to display all available hosts in the list. Can anybody help me to find all machines (host names/ip addresses) in the local area network Ganapathy
Simple answer. Why? This isn't a requirement for the assignment, so why do it at all. The only thing you get is the possibly losing points, you will not gain any points for incorporating this. If you just want to know the answer for this as a personal reason, I'd suggest posting the question in the distrubuted forum. Mark [ May 19, 2003: Message edited by: Mark Spritzler ]
Hi Mark, I want to provide the list of available computers in the network, is basically to choose the location of the database. If server runs on a differnet machine, how to select that. For this I thought to provide this solution, but other way is to provide text filed, where user enters machine name or ip address (where the server is up and running). Eg: //ganapathy. If the server is not available, interface will display appropriate message. Please let me know your idea on this. Regards, Ganapathy
I agree with Mark. Not only does your solution add unrequired complexity to your system, it does not address the case where a database server resides on a different subnet to your client. Would you try to have your "host browser" capable of browsing the whole Internet? I would stick with an editable text field, and perhaps use input validation (see the Sun tutorial on text fields) to ensure that only characters that are valid for a host name (ASCII letters, digits, hyphens and underscores, I think) are enterable.
Always proofread carefully to see if you any words out.
Joined: Mar 26, 2003
Hi Damian Ryan, We can provide either solutions. It is the problem of permission if we have to access subnet. In my case, we no need to bother about machine name. But I am surely looking for alternative because, I need to use InetAddress class in java.net package. But I feel there should be flexible to user, if user enter ip address instead of machine name, still the system should be able to resolve. Any way, providing text field is a better alternative, and it is easier as well. I too agree with you. Regards, Ganapathy
S. What is your first name? You solution for listing available servers is too far beyond the requirements that I strongly recommend not using this solution. The user should be able to enter an IP address or server Name. If you concerns are regarding to DNS servers, and other Networking issues, you can ignore these problems and safely assume that they have these network issues configured correctly, such that if they enter the server name or IP address that that server is available and they can access it without outside networking issues. Mark
Joined: Mar 26, 2003
Hi Mark, My first name is Ganapathy, and "S" is the sir name initial. So is it better to use machine name or ipaddress to choose server? I am also convinenced by this. What ever I proposed, begining itself, I had doubt about the complication, as I am dragging the solution beyong the requirement. I planned to provide a text field to enter server name/ip address for the database location. Regards, Ganapathy