Quantcast
Channel: User ZhekaKozlov - Stack Overflow
Browsing all 46 articles
Browse latest View live

Comment by ZhekaKozlov on JavaFX and jfxwebkit.dll

Please see this similar issue: bugs.openjdk.java.net/browse/JDK-8246796. This could help.

View Article



Comment by ZhekaKozlov on How to Enable Verbose in Maven Ant Run Plugin. (Maven)

You can run the entire Maven build with -X flag

View Article

Comment by ZhekaKozlov on jdeps returns "not found"

@FARS How about Powershell? Can you try from there? Also, you can do it from Linux

View Article

Comment by ZhekaKozlov on How to asynchronously call a method in Java

1.) You allocate a thread pool with multiple threads while you only need one. 2.) You don't shut down your executor. Every executor should be properly shut down, otherwise its threads will run forever.

View Article

Comment by ZhekaKozlov on How to asynchronously call a method in Java

@djangofan Right. Also, in rare cases this code can throw RejectedExecutionException refusing to run the task (JDK-8145304).

View Article


Comment by ZhekaKozlov on Jenkins Publish over ssh authentification failed...

See this issue on GitHub

View Article

Comment by ZhekaKozlov on I am not able to use Unicode system in my Intellij IDE

IDEA-291006

View Article

Comment by ZhekaKozlov on Why aren't there more pauseless GC's

@BodoThiesen In Java 16, they reduced pauses to 1ms (blog post).

View Article


Comment by ZhekaKozlov on How to get the last value of an ArrayList

There is a JEP 431 that will introduce SequencedCollection to Java. There will be methods such as getFirst(), getLast(), addFirst() and so forth.

View Article


Comment by ZhekaKozlov on Maven Profile - Activate Profile depending on...

It's possible since Maven 3.9.0

View Article

Comment by ZhekaKozlov on How to get a reversed list view on a list in Java?

List.reverse() is available since Java 21.

View Article

Comment by ZhekaKozlov on docker-compose healthcheck retry frequency != interval

There is a new option start_interval in Docker 25 (not released yet). See github.com/docker/compose/issues/10830.

View Article

Comment by ZhekaKozlov on Received fatal alert: handshake_failure through...

One possible reason of SSLHandshakeException is a missing JDK module: stackoverflow.com/questions/55439599/…

View Article


Comment by ZhekaKozlov on Is system environment variable allowed in keycloak...

This substitution only works when Keycloak is started as kc start/start-dev --import-realm. It won't work if you run a standalone kc import command.

View Article

Comment by ZhekaKozlov on Java: Get first item from a collection

Since Java 21 you can use Collection.getFirst() (if your collection is SequencedCollection which is very likely)

View Article


Answer by ZhekaKozlov for Using log4j 2.10.0 with Java 9 System.Logger

Log4j 2 supports JDK platform logging since version 2.13.2. If you want to use System.Logger with Log4j 2 as a backend, you need to use log4j-jpl...

View Article

Answer by ZhekaKozlov for How to sort a List/ArrayList?

Here is a short cheatsheet that covers typical cases:import static java.util.Comparator.comparing;// sortlist.sort(naturalOrder());// sort (reversed)list.sort(reverseOrder());// sort by...

View Article


Answer by ZhekaKozlov for Remove first N occurrence of an element from a List

Using lambdas:Runnable runnable = () -> { for (int i = 0; i < 3; i++) { myList.remove(Integer.valueOf(2)); }};runnable.run();Just kidding.

View Article

Answer by ZhekaKozlov for How to tell which module does the package belong to?

Is this what you want?Optional<Module> found = ModuleLayer .boot() .modules() .stream() .filter(module -> module.getPackages().contains("java.util")) .findFirst();

View Article

Convert explicit type to var in IDEA

I have a Java 10 project with the following code:Map<String, String> map = method();When I put the cursor on Map... and press Alt+Enter, there should be an option "Replace explicit type with...

View Article
Browsing all 46 articles
Browse latest View live




Latest Images