Skip to content

Bundle JavaFX app with openjdk 11 + runtime

I’ve created a small HelloWorld Java app that relies on OpenJDK 11 and JavaFX. The app is packaged in a jar file which can only be run if I have installed Java 11 and JavaFX on my system separately. Now I’d like to convert my jar into a self-contained Java application which includes JavaFX and a f…

Java detect when application is closing

I learned Java for about 1 year some years ago. Now I wanted to go back to it, but my skills got a bit rusty. So I’m using Eclipse with the WindowBuilder to make an easy Form Application to get started again. I wanted to get a popup window when I exit the application because in future projects I need

SearchView icon shows twice

I’ve implemented SearchView inside my toolbar, following Android’s official instructions. SearchView works well itself, but when I tap the search icon, it is shifted to the left instead of showing the Search Hint and Close button, although if I click this “second Search” icon, finally …

Can’t run a simple demo of a Media class

I found a video on YouTube about using Media class, but when I try to do it – it gives me an error. Could somebody tell me whats wrong? Here’s the code, exactly how I saw it in the video: And here’s the error I get: Answer root.getChildren().add(root); you can’t add root to itself. Als…

How can tabula (JAR) be called from Java?

Tabula looks like a great tool for extracting tabular data from PDFs. There are plenty of examples of how to call it from the command line or use it in Python but there doesn’t seem to be any documentation for use in Java. Does anyone have a worked example? Note, tabula does provide source code but it s…

Lombok annotations has no effect

I have a spring boot app 2.0.5.RELEASE with a lombok dependency for version 1.18.2 with scope set to provided. An exmaple: In that case I’m getting an error as repository field is null. When I remove lombok @AllArgsConstructor and put it directly: Then it works, a proper component is injected in the rep…