In this socket programming example, client sends two numbers towards the server and then server responds by adding this two numbers. This one is simple client-server program written in JAVA using NetBeans IDE 8.0.2.
To run this, follow the steps below:
First download this project and extract it at your desired location.
- Start NetBeans.
- File -> Open Project (Ctrl+Shift+O)
- Locate the folder in which you have stored extracted folder.
- You will find a folder named 'Simple-Socket-Programming-JAVA--master', open it.
- In this folder, you will find project folder with same name, open it. This will load entire project in NetBeans.
- In source package, you will find two programs named as 'client.java' and 'server.java'. Open both.
- Now, first do 'Shift+F6' in server.java and then in 'client.java'. (This sequence is important)
This will succesfully run the project.