Getting a File from the resource directory

Getting a File from the resource directory

In every project that I start I’m always fussing with getting a file from the classpath when testing some code. For example, when I have to get an XML file and compare it with some test result. I always end up with a method called getResourceAsAString or...
GraalVM – Native Images – Getting Started

GraalVM – Native Images – Getting Started

GraalVM is the hype in the Java world. It is a so called ‘Universal Virtual Machine’ that allows you to run all kinds of languages native on any host system. It profiles itself as an ‘High-Performance polyglot VM’. According to their website: GraalVM is a universal...
WELD-001409 – Ambiguous dependencies

WELD-001409 – Ambiguous dependencies

Weld/CDI resolves bean injection mainly based on type or name. This is sufficient for most cases and works like a charm. You can either specify a name yourself or inject it by simply letting CDI resolve the type for you. The following snippet shows how easy it is....