Searching for files in an Ant script

Steve Neal Development, Tool support Leave a Comment

This is a simple technique for determining whether or not files matching a given pattern exist within your project. Unlike the available task, this does not require that you need to know the exact name of the file when creating the build file. It is therefore very useful for checking existence of generated/downloaded artefacts. I’ll demonstrate the technique with an …

Adding a thread timeout to methods in Java

Steve Neal Development, Java Programming 1 Comment

When calling a method that could potentially take longer that you’d like to complete, it is possible to write code that will back out after a given time period. This can happen in numerous circumstances where you’d like an application to maintain a degree of liveness. I’ve used it recently in an application that needed to run a number of …