"jar:file" vs. only "file:" reference when retrieving resources in Java

This question is related to my question Jetty 11.0.11 – 404 on html file in \src\main\webapp\static – maven embedded fat jar What –EXACTLY– does "jar:file" mean as a Java resource reference, vs. just "file:"? And how is that influenced by the operating system ran under? E. g. using this resource reference in Jetty webserver, in… Read More "jar:file" vs. only "file:" reference when retrieving resources in Java

how to access docker service in localhost

I creates a simple service with docker image. how I want to access it in localhost of my system. docker service create –name my-app –replicas 3 -p 9090:8000 my-app-image docker service ls ID NAME MODE REPLICAS IMAGE PORTS ojvi1m6f8b41 my-app replicated 3/3 my-app-image:latest *:9090->8000/tcp docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 92b7d0ee0732… Read More how to access docker service in localhost

How do I write a JSON file using GSON in the resources folder without using src/main/resources?

I’m trying to write a JSON file with GSON in the resources folder without using src/main/resources: package repository; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import org.tinylog.Logger; import java.io.*; import java.util.List; public class GsonRepository<T> extends Repository<T> { private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); public GsonRepository(Class<T> elementType) { super(elementType); } public void saveToFile(String resourceName) throws… Read More How do I write a JSON file using GSON in the resources folder without using src/main/resources?