How to execute shell command from Java

  • 20 June 2018
  • ADM

How to execute a shell command from Java using Runtime.getRuntime().exec() method.


How to generate UUID / GUID in Java

  • 19 June 2018
  • ADM

How to generate UUID / GUID in Java using java.util.UUID class, UUID.randomUUID() method.


How to check if file exists in Golang

  • 29 March 2018
  • ADM

How to check if a file exists in Golang using os.Stat method. A FileInfo describing the named file or an error is returned.


How to split a string in Java

  • 05 March 2018
  • ADM

How to split a string in Java using both variants of the split() method: split(String regex) and split(String regex, int limit).


How to generate JAXB classes with xjc

  • 05 March 2018
  • ADM

How to generate JAXB classes with xjc. Command line: xjc -d src -p com.admfactory.client schema.xsd


How to get local computer name and IP in Java

  • 05 March 2018
  • ADM

How to get local computer name and IP in Java. Simple snippet using InetAddress.getLocalHost() method.