log4j.properties basic examples

  • 09 February 2017
  • ADM

log4j.properties basic examples. Output to the console and to the file.


How to send emails using JavaMail

  • 08 February 2017
  • ADM

How to send emails using JavaMail. Simple example using a gmail account and proxy settings if needed.


GET/POST request with Apache HttpClient

  • 27 January 2017
  • ADM

GET/POST request tutorial using Apache HttpClient. The tutorial is using httpbin.org test server.


How to copy directory in Java

  • 21 January 2017
  • ADM

How to copy a directory and all sub-directories or files in Java. The recursive method used to traverse all the subdirectories.


How to copy files in Java

  • 18 January 2017
  • ADM

How to copy files in Java with three examples: Classic method with streams, using FileChannel class and using Files class.


How to calculate date/time difference in Java

  • 16 January 2017
  • ADM

How to calculate the date and time difference in Java using a simple method of division and remainder of division.