Delete Files with Java 8

A friend asked me to help him with the following in Bash – delete all files but a whitelisted and use mix / max depth for directory traversal. It’s probably possible in Bash with some crazy find, grep, etc one-liner. But here’s how good it looks in Java 8 with streams, predicates, etc… With Java… read more »

Connect to Elasticsearch with Java and RestHighLevelClient

Connecting to Elasticsearch and executing queries is generally considered easy. In fact, in many cases a simple curl query like this one is all you need: Though, if you want something more than just finding all documents that contain mySearch (as per the example above), you may get lost in the abundance of options and… read more »

How to Change JVM Xms and Xmx for Tomcat on Windows

Changing Tomcat’s initial (Xms) and maximum (Xmx) memory turns out to be counter-intuitive on Windows, especially when Tomcat is installed as a service. That’s because when running under a service on Windows, Tomcat does not read initial runtime configure files such as setenv.bat (or for Linux) and thus you cannot define variables there. So… read more »