Although these are native C library tutorials, you will find that the procedures and sequences of calls are nearly identical. If you know the C and java languages, you shouldn't have much trouble translating these tutorials to java and jNetPcap API.
For example:
char *dev, errbuf[PCAP_ERRBUF_SIZE];
dev = pcap_lookupdev(errbuf);
if (dev == NULL) {
fprintf(stderr, "Couldn't find default device: %s\n", errbuf);
return(2);
}
translates to jNetPcap API as follows:
StringBuilder errbuf = new StringBuilder();
String dev = Pcap.lookupDev(errbuf);
if (dev == null) {
System.err.printf("Couldn't find default device: %s\n", errbuf);
return 2;
}
Here is a list of tutorials that you may find useful: