I'm currently working on a Java application implying multicast connection.
My development machine is a Mac, and I'm having troubles connecting to the multicast group. I fixed it by adding the argument -Djava.net.preferIPv4Stack=true
is my running configuration. I can't set this property to true
at runtime since the JVM reads it once at startup and not at runtime.
My problem is that when I will release my application, I want the user to simple 'double-click' on the icon and it will launch without any problem, even if the user is using Windows, Mac or any Linux distribution.
So my question is, how can I force the JVM to launch the .jar
with this argument? Is there any way to tell maven to do that?
Many thanks in advance