SFTP in Batch Mode Hangs Using Runtime.exec() in Java

When we have applications that call native commands via java.lang.Runtime.exec(), be wary of the invocations. It could potentially output an overwhelmingly large number of texts to the standard output—for example, the sftp command in Linux.  Therefore, causing the codes to hang.

Invoking JavaScript from within an Applet

If you did not know that you can invoke JavaScript from within an Applet, chances are you would port most JavaScript codes to Java or, worse, resort to some exotic coding. Otherwise, you would reuse the existing codes. This post

Using JPoller

JPoller is a general purpose Java component to poll directories and asynchronously notify client code of incoming files.

Convert String to LocalDate in JodaTime and Java 8

Handling dates (and time) is never easy and time-consuming. Moreover, its support by Java has been inadequate. If you find yourself longing for some libraries to ease the pain, go ahead because you are not alone. For pre-Java 8, one

PostgreSQL Terminate Active Connections

Sometimes we need to terminate active connections to a database forcefully. Doing such requires two things, determining which active connections to target and running the command to terminate them. This post shows how to terminate active connections using some SQL

Find Out the Differences between Two Objects in Java

This post demonstrates how to identify and list the differences between two objects using a set of classes and interfaces from Apache Commons Lang. Classes, Intefaces, and pom.xml The classes and interfaces to be used for this post are as

Kotlin – Using Java 8 Date and Time API

This post shows sample Kotlin codes that use the Java 8 Date and Time API (java.time). Requirements These are Software applications used for this post. IntelliJ IDEA Ultimate 2016.3 The Community Edition may be enough but we have not tried

EJB2.0 with OpenEJB: Session Bean and the Remote Client

This is the second part of the blog I wrote about EJB2.0 with OpenEJB. On the first part, we created a stateless session bean and deployed it in OpenEJB. On this part, we write, and test a simple Java class that remotely uses the deployed session bean.