Java for Network Programming
(based on material from Java for Students by Bell and Parr)
Network programming is all about making a program running on one computer talk to a program running on another computer.
The Java library package java.net provides lots of useful classes and methods for networking. For example, the class InetAddress handles Internet addresses, both as host names and as IP addresses. The OO approach in designing the Java library classes is to model each internet concept as a class. So, the important classes are InetAddress, URL, Socket. We will look at these in turn.
Topics:
To understand the network Java programs discussed here, you need to understand:
All the programs are applications (not applets) because they need the privilege to access the network and remote computers.
These notes have been adapted from a supplementary book chapter by Douglas Bell and Mike Parr, and modified to fit local conditions.