Tag Archives: java

Udp Socket Programming in Java – How to Code Client and Server

By | August 5, 2020

UDP – User Datagram Protocol sockets UDP is an alternative protocol to the more commonly used TCP protocol. It is a connection-less protocol where you directly send packets without have to establish a proper connection. UDP packets have smaller headers compared to TCP headers. Also data communication is faster since no acknowledgement is exchanged for… Read More »

Java socket programming Tutorial – How to code Client and Server

By | August 5, 2020

Socket programming in Java This is a quick guide/tutorial to learning socket programming in Java. The Socket class is documented at http://docs.oracle.com/javase/1.4.2/docs/api/java/net/Socket.html To summarise the basics, sockets are the fundamental “things” behind any kind of network communications done by your computer. For example when you type www.google.com in your web browser, it opens a socket… Read More »

Execute an sql script in jdbc

By | April 4, 2008

The SQL Script should have comments starting with – or — only on new lines and each command should end with a ; . Reading a sql file and putting all of it in a string variable and feeding to the execute command would result in an exception. All instructions must be executed individually. A… Read More »

Read write and save configurations to a file in java

By | April 2, 2008

Configuration files are used in applications to store settings, user preferences and other configuration parameters of an application so that. When configurations are changed from within the application these need to be saved so that next time the application starts with these new settings. In Java reading and writing to a configuration is pretty simple… Read More »