Skip to content

Tag: java

JavaFX app overwriting files while being open causes exception

I have a runnable jar file (with a lib folder housing all the dependency jars). This is located on a network share which anyone that has access can run from. This works great except one huge caveat. If I want to deploy a new version of the software, I have to ask everyone to exit the application first. This i…

How to use Kafka with SSL via logback appander?

I use this logback appender to send logs to Kafka: https://github.com/danielwegener/logback-kafka-appender When Kafka was PLAINTEXT everything worked correctly. But when Kafka changed to SSL, it is not possible to send messages. I did not find the necessary information in readme.md. Has anyone had this setup …

Using links to static and non-static methods with interface

Why I can call non-static method length() from class String, but I can’t call non-static method lengthHelper( String line ) from my class ExpressionHelper? Answer String::length is an instance method of String. It requires an instance of String to run, which you are providing, because you are passing el…

How to create new array without elements in certain range?

So I have a first and last variable which is the starting and ending markers that I want to get rid of. So the starting input for example would be [5, 10, 15, 20, 25] And say first = 1 and last = 3. The would mean that the elements 10, 15, and 20 would not be included in the