I have JavaFX application that based on GluonFX framework. It creates simple Server Socket:
public class Application {
private static final int SOCKET_PORT = 40009;
public static void main(String[] args) {
try {
try (ServerSocket ss = new ServerSocket()) {
ss.bind(new InetSocketAddress("localhost", SOCKET_PORT));
System.out.println("Server started");
ss.accept();
}
} catch (IOException e) {
System.out.println("Something go wrong");
}
}
When I run application as java process (for example in intellij idea)
I can ping 40009 port by command:
netstat -vanp tcp | grep 40009
But when I create native runner for this app and run it. This port is free. In this time an app works correctly but port is free. Why port is free for native run ?
P.S. I tried to reproduce following case for Graal VM and it works correctly.
I have JavaFX application that based on GluonFX framework. It creates simple Server Socket:
When I run application as java process (for example in intellij idea)
I can ping 40009 port by command:
netstat -vanp tcp | grep 40009
But when I create native runner for this app and run it. This port is free. In this time an app works correctly but port is free. Why port is free for native run ?
P.S. I tried to reproduce following case for Graal VM and it works correctly.