File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes General Computing and the fly likes Help with network connection between 2 computers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Help with network connection between 2 computers" Watch "Help with network connection between 2 computers" New topic

Help with network connection between 2 computers

Mark O' Sullivan
Ranch Hand

Joined: Aug 17, 2009
Posts: 160
I'm currently trying to test the network connectivity between 2 computers for the remote client and server. The operating system I'm currently using is Windows XP. I have created the a separate network name for each computer and a shared workgroup name using the Network Setup wizard. I have placed all shared documentation in the "shared Documents" folder of both computers. Unfortunately though, when I run the server, it starts but I have getting no details for the running server under the "netstats" command prompt option.
I also tried to run the network client upon a different computer and I'm wondering what I need to connect to server on different computer, is it just the other computer name or is it the Workgroup name? Any help/advice appreciated.
Ehsan Rahman
Ranch Hand

Joined: Feb 16, 2009
Posts: 59

Hi Mark,

If I understand you correctly, you're trying to set up a Window's connection between the two computers to share files? i.e. using the windows "Share Folders" feature?

If so, then one thing I did today is to navigate to the Properties settings of a network connection, then under the 'Generals' tab install all client, service and protocols available.


SCJP 1.5, SCJD 1.6
Carlos Morillo
Ranch Hand

Joined: Jun 06, 2009
Posts: 221


I am not a Microsoft Windows Expert but AFAIK Java RMI relies only on basic and plain TCP/IP Network Connectivity so you don't need to mess around with Workgroups, etc.

What you need to do and make sure is to have the IP addresses of BOTH systems running Windows in C:\WINDOWS\system32\drivers\etc\hosts.
You can edit this text file with Notepad.

You can open a Command Prompt to find out the IP address of the system by using the command ipconfig /all and then testing basic TCP/IP Connectivity with ping using as the argument the IP address of the other system.

Keep in mind if any of the systems is using DHCP the IP addresses they are using might change the next time they are rebooted.

Hope this helps,


Roel De Nijs

Joined: Jul 19, 2004
Posts: 8393

Hi Mark,

If you have a router it should be straightforward: when I tested my application on 2 computers (1 desktop and 1 laptop), I plugged a network cable in the router, 1 for each computer (of course). Then I started my server application on the laptop (database file was on the laptop itself). Finally I started the client application in networked mode, just entering the ip address of the laptop and the port number I used to run the server on the laptop. It worked just like that, no network setup wizard or other configurations.

Kind regards,

SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
Mark O' Sullivan
Ranch Hand

Joined: Aug 17, 2009
Posts: 160
Cheers, got this working. The main issue was I was missing a driver for one of network cards on a PC. Was very easy to setup after that, and great to know how simple it is for 2 computers to communicate using TCP/IP. Thanks for everyone's help!
I agree. Here's the link:
subject: Help with network connection between 2 computers
It's not a secret anymore!