This post demonstrates how to use Java ExecutorService and AutoCloseable with try-with-resources. With ExecutorService, we need to call the shutdown method all the time. However, call the shutdown method means we are writing more codes than we should. There has
How To Validate XML String against XSD Without Writing To A File
This post shows how to validate XML string data against XSD files in Java. Most of the time, we work directly with XML files instead of string format. We point to an XML file and validate it against XSDs. However,
Java 8 Convert Stream Values to Map Entries Examples
This post demonstrates how to convert a stream of objects to a Map object using Collectors.toMap(…) methods.
Java Lambda Expression Parameter and Return Types
This post demonstrates the type of arguments we can pass to and return from a Lambda expression based on the functional interface abstract method definition.
How to Run UNIX SFTP in Java To FTP File
This post shows how to run the native Unix sftp command in Java to upload files. We basically want to run the following command in Java. The Unix command is not directly translational to Java. However, we want to execute
Chapter 2: Why You Should Learn Programming With Java
In the early 90s, Sun Microsystems developed and released the Java programming language. It is a general-purpose and high-level language that can run on various operating systems, like Windows, Mac OS, and UNIX platforms. This post gives an overview of
Java – Deploy Java CLI Application to Docker Image
With Docker, we can create portable Java CLI applications for various environments by pre-building container images. These images could make deployment a lot easier and less messy in particularly in Production environments. This post briefly demonstrates how to create a
Ruby vs Java – Read and Write Text Files
This post demonstrates how to read and write text files in several scenarios. It makes some short references to equivalent Java concepts and codes.
Web Service Using Apache XML-RPC: Server And Client-Side
This articles demonstrates how to use Apache XML-RPC in Java command-line applications. We will create programs both for XML-RPC server and client.
How to write Logographic Characters to Files using UTF-8 Encoding
Background This article demonstrates how to write various logographic characters like Kanji (from Japan), Hanja (from Korea), and Hanzi (from China) to files using UTF-8 encoding. In a B2B system, it is not uncommon to read and write files in